Selaa lähdekoodia

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

Frontend ui refactor
daniel 6 vuotta sitten
vanhempi
commit
c34355c4c4

+ 2 - 0
app/Http/Controllers/SettingsController.php

@@ -171,6 +171,8 @@ class SettingsController extends Controller
       $fields = [
           'is_private',
           'crawlable',
+          'show_profile_follower_count',
+          'show_profile_following_count'
       ];
       foreach($fields as $field) {
           $form = $request->input($field);

+ 36 - 0
database/migrations/2018_08_22_022306_update_settings_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class UpdateSettingsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('user_settings', function (Blueprint $table) {
+            $table->boolean('show_profile_followers')->default(true);
+            $table->boolean('show_profile_follower_count')->default(true);
+            $table->boolean('show_profile_following')->default(true);
+            $table->boolean('show_profile_following_count')->default(true);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        $table->dropColumn('show_profile_followers');
+        $table->dropColumn('show_profile_follower_count');
+        $table->dropColumn('show_profile_following');
+        $table->dropColumn('show_profile_following_count');
+    }
+}

+ 20 - 19
resources/views/discover/tags/show.blade.php

@@ -21,27 +21,28 @@
       </div>
     </div>
   </div>
-
-  <div class="tag-timeline row">
-    @foreach($posts as $status)
-    <div class="col-4 p-0 p-sm-2 p-md-3">
-      <a class="card info-overlay card-md-border-0" href="{{$status->url()}}">
-        <div class="square {{$status->firstMedia()->filter_class}}">
-          <div class="square-content" style="background-image: url('{{$status->thumb()}}')"></div>
-          <div class="info-overlay-text">
-            <h5 class="text-white m-auto font-weight-bold">
-              <span class="pr-4">
-              <span class="far fa-heart fa-lg pr-1"></span> {{$status->likes_count}}
-              </span>
-              <span>
-              <span class="far fa-comment fa-lg pr-1"></span> {{$status->comments_count}}
-              </span>
-            </h5>
+  <div class="tag-timeline">
+    <div class="row">
+      @foreach($posts as $status)
+      <div class="col-4 p-0 p-sm-2 p-md-3">
+        <a class="card info-overlay card-md-border-0" href="{{$status->url()}}">
+          <div class="square {{$status->firstMedia()->filter_class}}">
+            <div class="square-content" style="background-image: url('{{$status->thumb()}}')"></div>
+            <div class="info-overlay-text">
+              <h5 class="text-white m-auto font-weight-bold">
+                <span class="pr-4">
+                <span class="far fa-heart fa-lg pr-1"></span> {{$status->likes_count}}
+                </span>
+                <span>
+                <span class="far fa-comment fa-lg pr-1"></span> {{$status->comments_count}}
+                </span>
+              </h5>
+            </div>
           </div>
-        </div>
-      </a>
+        </a>
+      </div>
+      @endforeach
     </div>
-    @endforeach
   </div>
   <div class="d-flex justify-content-center pagination-container mt-4">
     {{$posts->links()}}