Bladeren bron

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

Frontend ui refactor
daniel 6 jaren geleden
bovenliggende
commit
a70522b288

+ 1 - 4
app/Http/Controllers/InternalApiController.php

@@ -113,10 +113,7 @@ class InternalApiController extends Controller
                 'type'
               )
               ->whereNull('uri')
-              ->whereHas('media')
-              ->whereHas('profile', function($q) {
-                return $q->whereNull('status');
-              })
+              ->whereIn('type', ['photo','photo:album', 'video'])
               ->whereIsNsfw(false)
               ->whereVisibility('public')
               ->whereNotIn('profile_id', $following)

+ 18 - 7
app/Util/Lexer/RestrictedNames.php

@@ -12,9 +12,6 @@ class RestrictedNames
      'autoconfig',
      'blog',
      'broadcasthost',
-     'contact',
-     'contact-us',
-     'contact_us',
      'copyright',
      'download',
      'domainadmin',
@@ -111,19 +108,23 @@ class RestrictedNames
      'booth',
      'bouncer',
      'c',
-     'css',
+     'cdn',
      'circle',
      'circles',
      'checkpoint',
-     'community',
-     'communities',
      'collection',
      'collections',
+     'community',
+     'communities',
+     'contact',
+     'contact-us',
+     'contact_us',
      'costar',
      'costars',
-     'cdn',
+     'css',
      'd',
      'dashboard',
+     'db',
      'deck',
      'dev',
      'developer',
@@ -143,8 +144,10 @@ class RestrictedNames
      'fonts',
      'g',
      'gdpr',
+     'graph',
      'group',
      'groups',
+     'h',
      'home',
      'help',
      'helpcenter',
@@ -162,10 +165,15 @@ class RestrictedNames
      'invite',
      'invites',
      'js',
+     'l',
      'lab',
      'labs',
      'legal',
      'live',
+     'loop',
+     'loops',
+     'location',
+     'locations',
      'login',
      'logout',
      'm',
@@ -183,6 +191,8 @@ class RestrictedNames
      'p',
      'page',
      'pages',
+     'pin',
+     'pins',
      'photo',
      'photos',
      'password',
@@ -212,6 +222,7 @@ class RestrictedNames
      'timeline',
      'timelines',
      'tour',
+     'tv',
      'user',
      'users',
      'username',

+ 5 - 0
config/instance.php

@@ -0,0 +1,5 @@
+<?php
+
+return [
+	'email' => env('INSTANCE_CONTACT_EMAIL'),
+];

BIN
public/js/components.js


BIN
public/js/discover.js


BIN
public/mix-manifest.json


+ 14 - 2
resources/assets/js/components/DiscoverComponent.vue

@@ -22,8 +22,12 @@
       <div class="row d-none">
         <div class="col-4 p-0 p-sm-2 p-md-3" v-for="post in posts">
           <a class="card info-overlay card-md-border-0" :href="post.url">
-            <div class="square filter_class">
-              <div class="square-content" v-bind:style="{ 'background-image': 'url(' + post.thumb + ')' }"></div>
+            <div class="square">
+              <span v-if="post.type == 'photo:album'" class="float-right mr-3 post-icon"><i class="fas fa-images fa-2x"></i></span>
+              <span v-if="post.type == 'video'" class="float-right mr-3 post-icon"><i class="fas fa-video fa-2x"></i></span>
+              <span v-if="post.type == 'video:album'" class="float-right mr-3 post-icon"><i class="fas fa-film fa-2x"></i></span>
+              <div class="square-content" v-bind:style="{ 'background-image': 'url(' + post.thumb + ')' }">
+              </div>
             </div>
           </a>
         </div>
@@ -46,6 +50,14 @@
     height:100px;
     background-size: cover !important;
   }
+  .post-icon {
+    color: #fff;
+    position:relative;
+    margin-top: 10px;
+    z-index: 9;
+    opacity: 0.6;
+    text-shadow: 3px 3px 16px #272634;
+  }
 </style>
 
 <script type="text/javascript">

+ 2 - 2
resources/views/admin/pages/home.blade.php

@@ -9,9 +9,9 @@
   </div>
   <hr>
   <p class="alert alert-warning">
-    <strong>Feature Unavailable:</strong> This feature will be released in v0.9.0.
+    <strong>Feature Unavailable:</strong> This feature will be released in a future version.
   </p>
-  {{--< div class="table-responsive">
+  {{-- <div class="table-responsive">
     <table class="table">
       <thead class="bg-light">
         <tr class="text-center">

+ 1 - 1
resources/views/admin/settings/backups.blade.php

@@ -9,6 +9,6 @@
   </div>
   <hr>
   <p class="alert alert-warning">
-    <strong>Feature Unavailable:</strong> This feature will be released in v0.9.0.
+    <strong>Feature Unavailable:</strong> This feature will be released in a future version.
   </p>
 @endsection

+ 6 - 5
resources/views/admin/settings/config.blade.php

@@ -5,9 +5,10 @@
 @section('section')
   <div class="title">
     <h3 class="font-weight-bold">Configuration Settings</h3>
-    <p class="lead">Edit any .env or config setting</p>
-    <hr>
-    <p class="alert alert-warning">
-      <strong>Feature Unavailable:</strong> This feature will be released in v0.9.0.
-    </p>
+    <p class="lead">Edit configuration settings</p>
+  </div>
+  <hr>
+  <p class="alert alert-warning">
+    <strong>Feature Unavailable:</strong> This feature will be released in a future version.
+  </p>
 @endsection

+ 1 - 1
resources/views/admin/settings/features.blade.php

@@ -9,6 +9,6 @@
   </div>
   <hr>
   <p class="alert alert-warning">
-    <strong>Feature Unavailable:</strong> This feature will be released in v0.9.0.
+    <strong>Feature Unavailable:</strong> This feature will be released in a future version.
   </p>
 @endsection

+ 1 - 1
resources/views/admin/settings/maintenance.blade.php

@@ -9,6 +9,6 @@
 </div>
 <hr>
 <p class="alert alert-warning">
-	<strong>Feature Unavailable:</strong> This feature will be released in v0.9.0.
+	<strong>Feature Unavailable:</strong> This feature will be released in a future version.
 </p>
 @endsection