Prechádzať zdrojové kódy

Merge pull request #647 from pixelfed/frontend-ui-refactor

Frontend ui refactor
daniel 6 rokov pred
rodič
commit
d05cf68ebc

+ 1 - 9
app/Http/Controllers/PublicApiController.php

@@ -162,6 +162,7 @@ class PublicApiController extends Controller
         switch ($status->scope) {
             case 'public':
             case 'unlisted':
+            case 'private':
                 $user = Auth::check() ? Auth::user() : false;
                 if($user && $profile->is_private) {
                     $follows = Follower::whereProfileId($user->profile->id)
@@ -173,15 +174,6 @@ class PublicApiController extends Controller
                 }
                 break;
 
-            case 'private':
-                $follows = Follower::whereProfileId($user->profile->id)
-                    ->whereFollowingId($profile->id)
-                    ->exists();
-                if($follows == false && $profile->id !== $user->profile->id) {
-                    abort(404);
-                }
-                break;
-
             case 'direct':
                 abort(404);
                 break;

+ 1 - 1
config/pixelfed.php

@@ -23,7 +23,7 @@ return [
     | This value is the version of your PixelFed instance.
     |
     */
-    'version' => '0.5.8',
+    'version' => '0.5.9',
 
     /*
     |--------------------------------------------------------------------------

BIN
public/js/components.js


BIN
public/mix-manifest.json


+ 31 - 0
resources/assets/js/components.js

@@ -58,6 +58,32 @@ require('./components/notifications');
 // Initalize Notification Helper
 window.pixelfed.n = {};
 
+Vue.component(
+    'photo-presenter',
+    require('./components/presenter/PhotoPresenter.vue')
+);
+
+Vue.component(
+    'video-presenter',
+    require('./components/presenter/VideoPresenter.vue')
+);
+
+Vue.component(
+    'photo-album-presenter',
+    require('./components/presenter/PhotoAlbumPresenter.vue')
+);
+
+Vue.component(
+    'video-album-presenter',
+    require('./components/presenter/VideoAlbumPresenter.vue')
+);
+
+
+Vue.component(
+    'mixed-album-presenter',
+    require('./components/presenter/MixedAlbumPresenter.vue')
+);
+
 Vue.component(
     'follow-suggestions',
     require('./components/FollowSuggestions.vue')
@@ -88,6 +114,11 @@ Vue.component(
     require('./components/Timeline.vue')
 );
 
+// Vue.component(
+//     'micro',
+//     require('./components/Micro.vue')
+// );
+
 Vue.component(
     'passport-clients',
     require('./components/passport/Clients.vue')

+ 30 - 201
resources/assets/js/components/PostComponent.vue

@@ -10,10 +10,11 @@
 .col-md-4 {
   background: #fff;
 }
-
+.postPresenterContainer {
+  background: #fff;
+}
 @media(min-width: 720px) {
   .postPresenterContainer {
-    background: #000;
     min-height: 600px;
   }
 }
@@ -57,8 +58,30 @@
             <div class="postPresenterLoader text-center">
               <div class="lds-ring"><div></div><div></div><div></div><div></div></div> 
             </div>
-            <div class="postPresenterContainer d-none">
+            <div class="postPresenterContainer d-none d-flex justify-content-center align-items-center">
+              <div v-if="status.pf_type === 'photo'" class="w-100">
+                <photo-presenter :status="status"></photo-presenter>  
+              </div>
 
+              <div v-else-if="status.pf_type === 'video'" class="w-100">
+                <video-presenter :status="status"></video-presenter>
+              </div>
+
+              <div v-else-if="status.pf_type === 'photo:album'" class="w-100">
+                <photo-album-presenter :status="status"></photo-album-presenter>
+              </div>
+
+              <div v-else-if="status.pf_type === 'video:album'" class="w-100">
+                <video-album-presenter :status="status"></video-album-presenter>
+              </div>
+
+              <div v-else-if="status.pf_type === 'photo:video:album'" class="w-100">
+                <mixed-album-presenter :status="status"></mixed-album-presenter>
+              </div>
+
+              <div v-else class="w-100">
+                <p class="text-center p-0 font-weight-bold text-white">Error: Problem rendering preview.</p>
+              </div>
             </div>
         </div>
 
@@ -210,153 +233,6 @@
 
 pixelfed.postComponent = {};
 
-pixelfed.presenter = {
-  show: {
-    image: function(container, media, status) {
-      $('.status-container')
-        .removeClass('orientation-unknown')
-        .addClass('orientation-' + media[0]['orientation']);
-      let wrapper = $('<div>');
-      container.addClass('d-flex align-items-center');
-      if(media[0]['filter_class']) {
-        wrapper.addClass(media[0]['filter_class']);
-      }
-      let el = $('<img>');
-      el.attr('src', media[0]['url']);
-      el.attr('title', media[0]['description']);
-      el.addClass('img-fluid');
-      wrapper.append(el);
-      if(status.sensitive == true) {
-        let spoilerText = status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media';
-        let cw = $('<details>').addClass('details-animated w-100');
-        let summary = $('<summary>');
-        let text = $('<p>').addClass('mb-0 lead font-weight-bold').text(spoilerText);
-        let direction = $('<p>').addClass('font-weight-light').text('(click to show)');
-        summary.append(text, direction);
-        cw.append(summary, wrapper);
-        container.append(cw);
-      } else {
-        container.append(wrapper);
-      }
-    },
-
-    video: function(container, media, status) {
-      let wrapper = $('<div>');
-      container.addClass('d-flex align-items-center');
-      let el = $('<video>');
-      el.addClass('embed-responsive-item');
-      el.attr('controls', '');
-      el.attr('loop', '');
-      el.attr('src', media[0]['url']);
-      el.attr('title', media[0]['description']);
-      wrapper.append(el);
-      if(status.sensitive == true) {
-        let spoilerText = status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media';
-        let cw = $('<details>').addClass('details-animated w-100');
-        let summary = $('<summary>');
-        let text = $('<p>').addClass('mb-0 lead font-weight-bold').text(spoilerText);
-        let direction = $('<p>').addClass('font-weight-light').text('(click to show)');
-        summary.append(text, direction);
-        cw.append(summary, wrapper);
-        container.append(cw);
-      } else {
-        container.append(wrapper);
-      }
-      
-      const player = new Plyr(el, {
-        controls: [
-            'restart', // Restart playback
-            'play', // Play/pause playback
-            'progress', // The progress bar and scrubber for playback and buffering
-            'current-time', // The current time of playback
-            'duration', // The full duration of the media
-            'volume', // Volume control
-            'captions', // Toggle captions
-            'settings', // Settings menu
-            'fullscreen', // Toggle fullscreen
-        ]
-      });
-      player.volume = 0.75;
-    },
-
-    imageAlbum: function(container, media, status) {
-      $('.status-container')
-        .removeClass('orientation-unknown')
-        .addClass('orientation-' + media[0]['orientation']);
-      let id = 'photo-carousel-wrapper-' + status.id;
-      let wrapper = $('<div>');
-      container.addClass('d-flex align-items-center');
-      wrapper.addClass('carousel slide carousel-fade');
-      wrapper.attr('data-ride', 'carousel');
-      wrapper.attr('id', id);
-      let indicators = $('<ol>');
-      indicators.addClass('carousel-indicators');
-      let prev = $('<a>');
-      prev.addClass('carousel-control-prev');
-      prev.attr('href', '#' + id);
-      prev.attr('role', 'button');
-      prev.attr('data-slide', 'prev');
-      let prevIcon = $('<span>').addClass('carousel-control-prev-icon').attr('aria-hidden', 'true');
-      let prevSr = $('<span>').addClass('sr-only');
-      prev.append(prevIcon, prevSr);
-      let next = $('<a>');
-      next.addClass('carousel-control-next');
-      next.attr('href', '#' + id);
-      next.attr('role', 'button');
-      next.attr('data-slide', 'next');
-      let nextIcon = $('<span>').addClass('carousel-control-next-icon').attr('aria-hidden', 'true');
-      let nextSr = $('<span>').addClass('sr-only');
-      let inner = $('<div>').addClass('carousel-inner');
-      next.append(nextIcon, nextSr);
-      for(let i = 0; i < media.length; i++) {
-        let li = $('<li>');
-        li.attr('data-target', '#' + id);
-        li.attr('data-slide-to', i);
-        if(i == 0) {
-          li.addClass('active');
-        }
-        indicators.append(li);
-        let item = media[i];
-        let carouselItem = $('<div>').addClass('carousel-item');
-        if(i == 0) {
-          carouselItem.addClass('active');
-        }
-        let figure = $('<figure>');
-        if(item['filter_class']) {
-          figure.addClass(item['filter_class']);
-        }
-
-        let badge = $('<span>');
-        badge.addClass('float-right mr-3 badge badge-dark');
-        badge.style = 'position:fixed;top:8px;right:0;margin-bottom:-20px;';
-        badge.text(i+1 + '/' + media.length);
-
-        let img = $('<img>');
-        img.addClass('d-block w-100');
-        img.attr('src', item['url']);
-
-        figure.append(badge, img);
-        carouselItem.append(figure);
-
-        inner.append(carouselItem);
-      }
-      wrapper.append(indicators, inner, prev, next);
-      if(status.sensitive == true) {
-        let spoilerText = status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media';
-        let cw = $('<details>').addClass('details-animated w-100');
-        let summary = $('<summary>');
-        let text = $('<p>').addClass('mb-0 lead font-weight-bold').text(spoilerText);
-        let direction = $('<p>').addClass('font-weight-light').text('(click to show)');
-        summary.append(text, direction);
-        cw.append(summary, wrapper);
-        container.append(cw);
-      } else {
-        container.append(wrapper);
-      }
-    }
-  }
-};
-
 export default {
     props: ['status-id', 'status-username', 'status-template', 'status-url', 'status-profile-url', 'status-avatar'],
     data() {
@@ -454,10 +330,13 @@ export default {
                 self.shares = response.data.shares;
                 self.likesPage = 2;
                 self.sharesPage = 2;
-                this.buildPresenter();
+                //this.buildPresenter();
                 this.showMuteBlock();
                 loader.hide();
+                pixelfed.readmore();
                 $('.postComponent').removeClass('d-none');
+                $('.postPresenterLoader').addClass('d-none');
+                $('.postPresenterContainer').removeClass('d-none');
             }).catch(error => {
               if(!error.response) {
                 $('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occured, cannot fetch media. Please try again later.');
@@ -529,56 +408,6 @@ export default {
         });
       },
 
-      buildPresenter() {
-        let container = $('.postPresenterContainer');
-        let status = this.status;
-        let media = this.media;
-
-        $('input[name="item"]').each(function(k, v) {
-            let el = $(v);
-            el.val(status.account.id);
-        });
-
-        if(container.children().length != 0) {
-          return;
-        }
-
-        let template = this.status.pf_type ? this.status.pf_type : this.statusTemplate;
-        switch(template) {
-          case 'image':
-          case 'photo':
-            pixelfed.presenter.show.image(container, media, this.status);
-          break;
-
-          case 'album':
-          case 'photo:album':
-            pixelfed.presenter.show.imageAlbum(container, media, this.status);
-          break;
-
-          case 'video':
-            pixelfed.presenter.show.video(container, media, this.status);
-          break;
-
-          case 'video:album':
-          case 'photo:video:album':
-              $('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('We cannot load this post properly. We\'re working on a fix!');
-                return;
-          break;
-
-          default:
-              $('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occured, cannot fetch media. Please try again later.');
-          break;
-
-        }
-        if(container.children().length == 0) {
-          $('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occured, cannot fetch media. Please try again later.');
-          return;
-        }
-        pixelfed.readmore();
-        $('.postPresenterLoader').addClass('d-none');
-        $('.postPresenterContainer').removeClass('d-none');
-      },
-
       likeStatus(event) {
         if($('body').hasClass('loggedIn') == false) {
           return;

+ 6 - 156
resources/assets/js/components/Timeline.vue

@@ -35,168 +35,23 @@
 
 				<div class="postPresenterContainer">
 					<div v-if="status.pf_type === 'photo'" class="w-100">
-						<div v-if="status.sensitive == true">
-							<details class="details-animated">
-								<summary>
-									<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
-									<p class="font-weight-light">(click to show)</p>
-								</summary>
-								<a class="max-hide-overflow" :href="status.url" :class="status.media_attachments[0].filter_class">
-									<img class="card-img-top" :src="status.media_attachments[0].url">
-								</a>
-							</details>
-						</div>
-						<div v-else>
-							<div :class="status.media_attachments[0].filter_class">
-								<img class="card-img-top" :src="status.media_attachments[0].url">
-							</div>
-						</div>
+						<photo-presenter :status="status"></photo-presenter>	
 					</div>
 
 					<div v-else-if="status.pf_type === 'video'" class="w-100">
-						<div v-if="status.sensitive == true">
-							<details class="details-animated">
-								<summary>
-									<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
-									<p class="font-weight-light">(click to show)</p>
-								</summary>
-								<div class="embed-responsive embed-responsive-16by9">
-									<video class="video" preload="none" controls loop>
-										<source :src="status.media_attachments[0].url" :type="status.media_attachments[0].mime">
-									</video>
-								</div>
-							</details>
-						</div>
-						<div v-else class="embed-responsive embed-responsive-16by9">
-							<video class="video" preload="none" controls loop>
-								<source :src="status.media_attachments[0].url" :type="status.media_attachments[0].mime">
-							</video>
-						</div>
+						<video-presenter :status="status"></video-presenter>
 					</div>
 
 					<div v-else-if="status.pf_type === 'photo:album'" class="w-100">
-						<div v-if="status.sensitive == true">
-							<details class="details-animated">
-								<summary>
-									<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
-									<p class="font-weight-light">(click to show)</p>
-								</summary>
-								<b-carousel :id="status.id + '-carousel'"
-									style="text-shadow: 1px 1px 2px #333;"
-									controls
-									indicators
-									background="#ffffff"
-									:interval="0"
-								>
-									<b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
-										<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
-									</b-carousel-slide>
-								</b-carousel>
-							</details>
-						</div>
-						<div v-else>
-							<b-carousel :id="status.id + '-carousel'"
-								style="text-shadow: 1px 1px 2px #333;"
-								controls
-								indicators
-								background="#ffffff"
-								:interval="0"
-							>
-								<b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
-									<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
-								</b-carousel-slide>
-							</b-carousel>
-						</div>
+						<photo-album-presenter :status="status"></photo-album-presenter>
 					</div>
 
 					<div v-else-if="status.pf_type === 'video:album'" class="w-100">
-						<div v-if="status.sensitive == true">
-							<details class="details-animated">
-								<summary>
-									<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
-									<p class="font-weight-light">(click to show)</p>
-								</summary>
-								<b-carousel :id="status.id + '-carousel'"
-									style="text-shadow: 1px 1px 2px #333; background-color: #000;"
-									controls
-									img-blank
-									background="#ffffff"
-									:interval="0"
-								>
-									<b-carousel-slide v-for="(vid, index) in status.media_attachments" :key="vid.id + '-media'">
-										<video slot="img" class="embed-responsive-item" preload="none" controls loop :alt="vid.description" width="100%" height="100%">
-											<source :src="vid.url" :type="vid.mime">
-										</video>
-									</b-carousel-slide>
-								</b-carousel>
-							</details>
-						</div>
-						<div v-else>
-							<b-carousel :id="status.id + '-carousel'"
-								style="text-shadow: 1px 1px 2px #333; background-color: #000;"
-								controls
-								img-blank
-								background="#ffffff"
-								:interval="0"
-							>
-								<b-carousel-slide v-for="(vid, index) in status.media_attachments" :key="vid.id + '-media'">
-									<video slot="img" class="embed-responsive-item" preload="none" controls loop :alt="vid.description" width="100%" height="100%">
-										<source :src="vid.url" :type="vid.mime">
-									</video>
-								</b-carousel-slide>
-							</b-carousel>
-						</div>
+						<video-album-presenter :status="status"></video-album-presenter>
 					</div>
 
 					<div v-else-if="status.pf_type === 'photo:video:album'" class="w-100">
-						<div v-if="status.sensitive == true">
-							<details class="details-animated">
-								<summary>
-									<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
-									<p class="font-weight-light">(click to show)</p>
-								</summary>
-								<b-carousel :id="status.id + '-carousel'"
-									style="text-shadow: 1px 1px 2px #333; background-color: #000;"
-									controls
-									img-blank
-									background="#ffffff"
-									:interval="0"
-								>
-									<b-carousel-slide v-for="(media, index) in status.media_attachments" :key="media.id + '-media'">
-
-										<video v-if="media.type == 'Video'" slot="img" class="embed-responsive-item" preload="none" controls loop :alt="media.description" width="100%" height="100%">
-											<source :src="media.url" :type="media.mime">
-										</video>
-
-										<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description">
-
-										<p v-else class="text-center p-0 font-weight-bold text-white">Error: Problem rendering preview.</p>
-
-									</b-carousel-slide>
-								</b-carousel>
-							</details>
-						</div>
-						<div v-else>
-							<b-carousel :id="status.id + '-carousel'"
-										style="text-shadow: 1px 1px 2px #333; background-color: #000;"
-										controls
-										img-blank
-										background="#ffffff"
-										:interval="0"
-									>
-								<b-carousel-slide v-for="(media, index) in status.media_attachments" :key="media.id + '-media'">
-
-									<video v-if="media.type == 'Video'" slot="img" class="embed-responsive-item" preload="none" controls loop :alt="media.description" width="100%" height="100%">
-										<source :src="media.url" :type="media.mime">
-									</video>
-
-									<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description">
-
-									<p v-else class="text-center p-0 font-weight-bold text-white">Error: Problem rendering preview.</p>
-
-								</b-carousel-slide>
-							</b-carousel>
-						</div>
+						<mixed-album-presenter :status="status"></mixed-album-presenter>
 					</div>
 
 					<div v-else class="w-100">
@@ -345,12 +200,7 @@
 	.postPresenterContainer {
 		display: flex;
 		align-items: center;
-		background: #000;
-	}
-	@media(min-width: 720px) {
-		.postPresenterContainer {
-			min-height: 600px;
-		}
+		background: #fff;
 	}
 	.cursor-pointer {
 		cursor: pointer;

+ 56 - 0
resources/assets/js/components/presenter/MixedAlbumPresenter.vue

@@ -0,0 +1,56 @@
+<template>
+	<div v-if="status.sensitive == true">
+		<details class="details-animated">
+			<summary>
+				<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
+				<p class="font-weight-light">(click to show)</p>
+			</summary>
+			<b-carousel :id="status.id + '-carousel'"
+				style="text-shadow: 1px 1px 2px #333; background-color: #000;"
+				controls
+				img-blank
+				background="#ffffff"
+				:interval="0"
+			>
+				<b-carousel-slide v-for="(media, index) in status.media_attachments" :key="media.id + '-media'">
+
+					<video v-if="media.type == 'Video'" slot="img" class="embed-responsive-item" preload="none" controls loop :alt="media.description" width="100%" height="100%">
+						<source :src="media.url" :type="media.mime">
+					</video>
+
+					<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description">
+
+					<p v-else class="text-center p-0 font-weight-bold text-white">Error: Problem rendering preview.</p>
+
+				</b-carousel-slide>
+			</b-carousel>
+		</details>
+	</div>
+	<div v-else>
+		<b-carousel :id="status.id + '-carousel'"
+					style="text-shadow: 1px 1px 2px #333; background-color: #000;"
+					controls
+					img-blank
+					background="#ffffff"
+					:interval="0"
+				>
+			<b-carousel-slide v-for="(media, index) in status.media_attachments" :key="media.id + '-media'">
+
+				<video v-if="media.type == 'Video'" slot="img" class="embed-responsive-item" preload="none" controls loop :alt="media.description" width="100%" height="100%">
+					<source :src="media.url" :type="media.mime">
+				</video>
+
+				<img v-else-if="media.type == 'Image'" slot="img" class="d-block img-fluid w-100" :src="media.url" :alt="media.description">
+
+				<p v-else class="text-center p-0 font-weight-bold text-white">Error: Problem rendering preview.</p>
+
+			</b-carousel-slide>
+		</b-carousel>
+	</div>
+</template>
+
+<script type="text/javascript">
+	export default {
+		props: ['status']
+	}
+</script>

+ 40 - 0
resources/assets/js/components/presenter/PhotoAlbumPresenter.vue

@@ -0,0 +1,40 @@
+<template>
+	<div v-if="status.sensitive == true">
+		<details class="details-animated">
+			<summary>
+				<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
+				<p class="font-weight-light">(click to show)</p>
+			</summary>
+			<b-carousel :id="status.id + '-carousel'"
+				style="text-shadow: 1px 1px 2px #333;"
+				controls
+				indicators
+				background="#ffffff"
+				:interval="0"
+			>
+				<b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
+					<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
+				</b-carousel-slide>
+			</b-carousel>
+		</details>
+	</div>
+	<div v-else>
+		<b-carousel :id="status.id + '-carousel'"
+			style="text-shadow: 1px 1px 2px #333;"
+			controls
+			indicators
+			background="#ffffff"
+			:interval="0"
+		>
+			<b-carousel-slide v-for="(img, index) in status.media_attachments" :key="img.id">
+				<img slot="img" class="d-block img-fluid w-100" :src="img.url" :alt="img.description">
+			</b-carousel-slide>
+		</b-carousel>
+	</div>
+</template>
+
+<script type="text/javascript">
+	export default {
+		props: ['status']
+	}
+</script>

+ 24 - 0
resources/assets/js/components/presenter/PhotoPresenter.vue

@@ -0,0 +1,24 @@
+<template>
+	<div v-if="status.sensitive == true">
+		<details class="details-animated">
+			<summary>
+				<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
+				<p class="font-weight-light">(click to show)</p>
+			</summary>
+			<a class="max-hide-overflow" :href="status.url" :class="status.media_attachments[0].filter_class">
+				<img class="card-img-top" :src="status.media_attachments[0].url">
+			</a>
+		</details>
+	</div>
+	<div v-else>
+		<div :class="status.media_attachments[0].filter_class">
+			<img class="card-img-top" :src="status.media_attachments[0].url">
+		</div>
+	</div>
+</template>
+
+<script type="text/javascript">
+	export default {
+		props: ['status']
+	}
+</script>

+ 44 - 0
resources/assets/js/components/presenter/VideoAlbumPresenter.vue

@@ -0,0 +1,44 @@
+<template>
+	<div v-if="status.sensitive == true">
+		<details class="details-animated">
+			<summary>
+				<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
+				<p class="font-weight-light">(click to show)</p>
+			</summary>
+			<b-carousel :id="status.id + '-carousel'"
+				style="text-shadow: 1px 1px 2px #333; background-color: #000;"
+				controls
+				img-blank
+				background="#ffffff"
+				:interval="0"
+			>
+				<b-carousel-slide v-for="(vid, index) in status.media_attachments" :key="vid.id + '-media'">
+					<video slot="img" class="embed-responsive-item" preload="none" controls loop :alt="vid.description" width="100%" height="100%">
+						<source :src="vid.url" :type="vid.mime">
+					</video>
+				</b-carousel-slide>
+			</b-carousel>
+		</details>
+	</div>
+	<div v-else>
+		<b-carousel :id="status.id + '-carousel'"
+			style="text-shadow: 1px 1px 2px #333; background-color: #000;"
+			controls
+			img-blank
+			background="#ffffff"
+			:interval="0"
+		>
+			<b-carousel-slide v-for="(vid, index) in status.media_attachments" :key="vid.id + '-media'">
+				<video slot="img" class="embed-responsive-item" preload="none" controls loop :alt="vid.description" width="100%" height="100%">
+					<source :src="vid.url" :type="vid.mime">
+				</video>
+			</b-carousel-slide>
+		</b-carousel>
+	</div>
+</template>
+
+<script type="text/javascript">
+	export default {
+		props: ['status']
+	}
+</script>

+ 26 - 0
resources/assets/js/components/presenter/VideoPresenter.vue

@@ -0,0 +1,26 @@
+<template>
+	<div v-if="status.sensitive == true">
+		<details class="details-animated">
+			<summary>
+				<p class="mb-0 lead font-weight-bold">{{ status.spoiler_text ? status.spoiler_text : 'CW / NSFW / Hidden Media'}}</p>
+				<p class="font-weight-light">(click to show)</p>
+			</summary>
+			<div class="embed-responsive embed-responsive-16by9">
+				<video class="video" preload="none" controls loop>
+					<source :src="status.media_attachments[0].url" :type="status.media_attachments[0].mime">
+				</video>
+			</div>
+		</details>
+	</div>
+	<div v-else class="embed-responsive embed-responsive-16by9">
+		<video class="video" preload="none" controls loop>
+			<source :src="status.media_attachments[0].url" :type="status.media_attachments[0].mime">
+		</video>
+	</div>
+</template>
+
+<script type="text/javascript">
+	export default {
+		props: ['status']
+	}
+</script>

+ 16 - 0
resources/lang/cs/site.php

@@ -0,0 +1,16 @@
+<?php
+
+return [
+
+	'about'			=> 'O nás',
+	'help'			=> 'Nápověda',
+	'language'		=> 'Jazyk',
+	'fediverse'		=> 'Fediverse',
+	'opensource'	=> 'Otevřený zdroj',
+	'terms'			=> 'Podmínky',
+	'privacy'		=> 'Soukromí',
+	'l10nWip'		=> 'Pořád pracujeme na podpoře lokalizace',
+	'currentLocale' => 'Aktuální překlad',
+	'selectLocale'  => 'Vyberte si jeden z podporovaných překladů',
+
+];

+ 20 - 0
resources/lang/eu/auth.php

@@ -0,0 +1,20 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Authentication Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used during authentication for various
+    | messages that we need to display to the user. You are free to modify
+    | these language lines according to your application's requirements.
+    |
+    */
+
+
+    'failed'   => 'Sartutako datuek ez dute balio.',
+    'throttle' => 'Saiakera gehiegi. Mesedez, saitu zaitez :seconds segundo barru.',
+
+];

+ 14 - 0
resources/lang/eu/navmenu.php

@@ -0,0 +1,14 @@
+<?php
+
+return [
+
+    'viewMyProfile'  => 'Ikusi nire profila',
+    'myTimeline'     => 'Nire denboralerroa',
+    'publicTimeline' => 'Denboralerro publikoa',
+    'remoteFollow'   => 'Urruneko Jarraipena',
+    'settings'       => 'Ezarpenak',
+    'admin'          => 'Admin',
+    'logout'         => 'Irten',
+    'directMessages' => 'Mezu zuzenak',
+
+];

+ 8 - 0
resources/lang/eu/notification.php

@@ -0,0 +1,8 @@
+<?php
+
+return [
+
+  'likedPhoto'          => '-(e)k argazkia gustuko du.',
+  'startedFollowingYou' => 'jarraitzen hasi zaizu.',
+
+];

+ 19 - 0
resources/lang/eu/pagination.php

@@ -0,0 +1,19 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Pagination Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used by the paginator library to build
+    | the simple pagination links. You are free to change them to anything
+    | you want to customize your views to better match your application.
+    |
+    */
+
+    'previous' => '« Aurrekoa',
+    'next'     => 'Hurrengoa »',
+
+];

+ 22 - 0
resources/lang/eu/passwords.php

@@ -0,0 +1,22 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Password Reset Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are the default lines which match reasons
+    | that are given by the password broker for a password update attempt
+    | has failed, such as for an invalid token or invalid new password.
+    |
+    */
+
+    'password' => 'Pasahitzak gutxienez 6 karaktere izan behar ditu, eta konfirmazio pasahitzarekin bat etorri behar da.',
+    'reset'    => 'Pasahitza aldatu da!',
+    'sent'     => 'E-postara pasahitza aldatzeko esteka bidali dizugu.',
+    'token'    => 'Pasahitza aldatzeko "token"-ak ez du balio.',
+    'user'     => 'Ez dugu aurkitu pasahitz hori duen erabiltzailerik.',
+
+];

+ 8 - 0
resources/lang/eu/profile.php

@@ -0,0 +1,8 @@
+<?php
+
+return [
+  'emptyTimeline'  => 'Erabiltzaile honek oraindik ez du ezer bidali!',
+  'emptyFollowers' => 'Erabiltzaile honek ez du jarraitzailerik!',
+  'emptyFollowing' => 'Erabiltzaile honek oraindik ez du inor jarraitzen',
+  'savedWarning'   => 'Gordetakoa zuk bakarrik ikusi dezakezu',
+];

+ 13 - 0
resources/lang/eu/site.php

@@ -0,0 +1,13 @@
+<?php
+return [
+	'about'			=> 'Honi buruz',
+	'help'			=> 'Laguntza',
+	'language'		=> 'Hizkuntza',
+	'fediverse'		=> 'Fedibertsoa',
+	'opensource'	=> 'Kode irekia',
+	'terms'			=> 'Baldintzak',
+	'privacy'		=> 'Pribatutasuna',
+	'l10nWip'		=> 'Oraindik lokalizazioen sustenguan lanean ari gara',
+	'currentLocale' => 'Uneko lokalizazioa',
+	'selectLocale'  => 'Aukeratu onartutako hizkuntzetako bat',
+];

+ 5 - 0
resources/lang/eu/timeline.php

@@ -0,0 +1,5 @@
+<?php
+
+return [
+  'emptyPersonalTimeline' => 'Zure denbora lerroa hutsik dago.',
+];

+ 122 - 0
resources/lang/eu/validation.php

@@ -0,0 +1,122 @@
+<?php
+
+return [
+
+    /*
+    |--------------------------------------------------------------------------
+    | Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines contain the default error messages used by
+    | the validator class. Some of these rules have multiple versions such
+    | as the size rules. Feel free to tweak each of these messages here.
+    |
+    */
+
+    'accepted'             => ':attribute onartuak izan behar dira.',
+    'active_url'           => ':attribute helbideak ez du zuzena.',
+    'after'                => ':attribute datak :date baino beranduagokoa izan behar du.',
+    'after_or_equal'       => ':attribute datak :date baino beranduagokoa edo berdina izan behar du.',
+    'alpha'                => ':attribute -(e)k letrak bakarrik izan ditzake',
+    'alpha_dash'           => ':attribute -(e)k letrak, zenbakiak eta gidoiak bakarrik onartzen ditu.',
+    'alpha_num'            => ':attribute -(e)k letrak eta zenbakiak bakarrik onartzen ditu',
+    'array'                => ':attribute zerrenda izan behar da.',
+    'before'               => ':attribute datak :date baino lehenagokoa izan behar du.',
+    'before_or_equal'      => ':attribute datak :date baino lehenagokoa edo berdina izan behar du.',
+    'between'              => [
+        'numeric' => ':attribute :min eta :max -ren artean izan behar da.',
+        'file'    => ':attribute :min eta :max kilobytes artean izan behar da.',
+        'string'  => ':attribute -(e)k :min eta :max karaktere bitartean izan behar ditu.',
+        'array'   => ':attribute -(e)k :min eta :max elementu bitartean izan behar ditu.',
+    ],
+    'boolean'              => ':attribute eremua "True" edo "False" izan behar da.',
+    'confirmed'            => ':attribute-ren baieztapenak ez datoz bat.',
+    'date'                 => ':attribute ez da data formatu egokia.',
+    'date_format'          => ':attribute -(e)k ez du :format formatua betetzen.',
+    'different'            => ':attribute eta :other ezberdinak izan behar dira.',
+    'digits'               => ':attribute -(e)k :digits zifra izan behar ditu.',
+    'digits_between'       => ':attribute -(e)k :min eta :max zifra bitartean izan behar ditu.',
+    'dimensions'           => ':attribute -(e)k onartzen ez diren tamainak ditu.',
+    'distinct'             => ':attribute eremuak bikoiztutako balorea du.',
+    'email'                => ':attribute eremua e-posta izan behar da.',
+    'exists'               => 'Aukeratutako :attribute ez da baliozkoa.',
+    'file'                 => ':attribute eremua fitxategia izan behar da.',
+    'filled'               => ':attribute eremuak balio egokia izan behar du.',
+    'image'                => ':attribute eremua irudia izan behar da.',
+    'in'                   => 'Aukeratutako :attribute elementua ez da baliozkoa.',
+    'in_array'             => ':attribute eremua ez da :other -en existitzen.',
+    'integer'              => ':attribute zenbaki osoa izen behar da.',
+    'ip'                   => ':attribute eremua IP helbide egokia izan behar da.',
+    'ipv4'                 => ':attribute eremua IPv4 helbide egokia izan behar da.',
+    'ipv6'                 => ':attribute eremua IPv6 helbide egokia izan behar da.',
+    'json'                 => ':attribute eremuak JSON egokia izan behar du.',
+    'max'                  => [
+        'numeric' => ':attribute ezin da :max baino handiagoa izan.',
+        'file'    => ':attribute -(e)k ezin du :max kilobyte baino gehiago izan.',
+        'string'  => ':attribute -(e)k ezin ditu :max karaktere baino gehiago izan.',
+        'array'   => ':attribute -(e)k ezin ditu :max elementu baino gehiago izan.',
+    ],
+    'mimes'                => ':attribute :values motatako fitxategia izan behar da.',
+    'mimetypes'            => ':attribute :values motatako fitxategia izan behar da.',
+    'min'                  => [
+        'numeric' => ':attribute gutxienez :min izan behar da.',
+        'file'    => ':attribute gutxienez :min kilobyte izan behar ditu.',
+        'string'  => ':attribute gutxienez :min karaktere izan behar ditu.',
+        'array'   => ':attribute -(e)k gutxienez :min elementu izan behar ditu.',
+    ],
+    'not_in'               => 'Aukeratutako :attribute elementuak ez du balio.',
+    'not_regex'            => ':attribute formatua ez da zuzena.',
+    'numeric'              => ':attribute zenbakia izan behar da.',
+    'present'              => ':attribute eremua egon behar da.',
+    'regex'                => ':attribute -ren formatua ez da zuzena.',
+    'required'             => ':attribute eremua derrigorrezkoa da.',
+    'required_if'          => ':attribute eremua derrigorrezkoa da :other :value denean.',
+    'required_unless'      => ':attribute eremua derrigorrezkoa da :other :values izan ezean.',
+    'required_with'        => ':values dagoenean, :attribute eremua derrigorrezkoa da.',
+    'required_with_all'    => ':values dagoenean, :attribute eremua derrigorrezkoa da.',
+    'required_without'     => ':attribute eremua derrigorrezkoa da :values eremua ez dagoenean.',    
+    'required_without_all' => ':attribute eremua beharrezkoa da :values bat bera ere ez dagoenean.',
+    'same'                 => ':attribute eta :other bat etorri behar dira.',
+    'size'                 => [
+        'numeric' => ':attribute :size izan behar da.',
+        'file'    => ':attribute -(e)k :size kilobyte izan behar ditu.',
+        'string'  => ':attribute -(e)k :size karaktere izan behar ditu.',
+        'array'   => ':attribute -(e)k :size elementu izan behar ditu.',
+    ],
+    'string'               => ':attribute testua izan behar da.',
+    'timezone'             => ':attribute ordutegi zuzena izan behar du.',
+    'unique'               => ':attribute ez dago eskuragarri.',
+    'uploaded'             => ':attribute igotzerakoan akatsa.',
+    'url'                  => ':attribute -ren formatua ez da egokia.',
+
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Language Lines
+    |--------------------------------------------------------------------------
+    |
+    | Here you may specify custom validation messages for attributes using the
+    | convention "attribute.rule" to name the lines. This makes it quick to
+    | specify a specific custom language line for a given attribute rule.
+    |
+    */
+
+    'custom' => [
+        'attribute-name' => [
+            'rule-name' => 'custom-message',
+        ],
+    ],
+
+    /*
+    |--------------------------------------------------------------------------
+    | Custom Validation Attributes
+    |--------------------------------------------------------------------------
+    |
+    | The following language lines are used to swap attribute place-holders
+    | with something more reader friendly such as E-Mail Address instead
+    | of "email". This simply helps us make messages a little cleaner.
+    |
+    */
+
+    'attributes' => [],
+
+];

+ 35 - 0
resources/lang/vendor/backup/eu/notifications.php

@@ -0,0 +1,35 @@
+<?php
+
+return [
+    'exception_message' => 'Salbuespen mezua: :message',
+    'exception_trace' => 'Salbuespen aztarna: :trace',
+    'exception_message_title' => 'Salbuespen mezua',
+    'exception_trace_title' => 'Salbuespen aztarna',
+
+    'backup_failed_subject' => 'Akatsa :application_name babeskopia egiterakoan',
+    'backup_failed_body' => 'Garrantzitsua: Akatsa gertatu da :application_name babeskopia egiterakoan',
+
+    'backup_successful_subject' => ':application_name babeskopia arrakastatsua',
+    'backup_successful_subject_title' => 'Babeskopia arrakastatsu berria!',
+    'backup_successful_body' => 'Berri onak, :application_name -ren babeskopia berria arrakastaz sortu da :disk_name izeneko diskoan.',
+
+    'cleanup_failed_subject' => ':application_name -ren babeskopiak garbitzean akatsa.',
+    'cleanup_failed_body' => 'Akatsa gertatu da :application_name -ren babeskopiak garbitzerakoan',
+
+    'cleanup_successful_subject' => ':application_name -ren babeskopiak arrakastaz garbituta',
+    'cleanup_successful_subject_title' => 'Babeskopien garbitze arrakastatsua!',
+    'cleanup_successful_body' => ':application_name -ren babeskopia garbitzea arrakastaz gauzatu da :disk_name izeneko diskoan.',
+
+    'healthy_backup_found_subject' => ':application_name -rentzat diren babeskopiak osasuntsu daude :disk_name diskoan',
+    'healthy_backup_found_subject_title' => ':application_name -rentzat diren babeskopiak osasuntsu daude',
+    'healthy_backup_found_body' => ':application_name -rentzat diren babeskopiak osasuntsutzat jotzen dira. Lan bikaina!',
+
+    'unhealthy_backup_found_subject' => 'Garrantzitsua: :application_name -rentzat diren babeskopiak ez daude osasuntsu',
+    'unhealthy_backup_found_subject_title' => 'Garrantzitsua: :application_name -rentzat diren babeskopiak ez daude osasuntsu. :problem',
+    'unhealthy_backup_found_body' => ':application_name -rentzat diren babeskopiak ez daude osasuntsu :disk_name diskoan.',
+    'unhealthy_backup_found_not_reachable' => 'Babeskopien helburua ezin izan da atzitu. :error',
+    'unhealthy_backup_found_empty' => 'Ez dago aplikazio honen babeskopiarik.',
+    'unhealthy_backup_found_old' => 'Azkena .date -n egindako babeskopia zaharregitzat jotzen da.',
+    'unhealthy_backup_found_unknown' => 'Barkatu, ezin da arrazoi zehatza zehaztu.',
+    'unhealthy_backup_found_full' => 'Babeskopiak leku gehiegi erabiltzen ari dira. Egungo erabilera :disk_usage -koa da, non, onartutako :disk_limit muga baino handiagoa den.',
+];