Browse Source

Merge pull request #5926 from pixelfed/staging

Staging
daniel 3 months ago
parent
commit
87887f4c67

+ 3 - 0
CHANGELOG.md

@@ -15,6 +15,9 @@
 - Update instance config, return proper matrix limits. Fixes #4780 ([473201908](https://github.com/pixelfed/pixelfed/commit/473201908))
 - Update instance config, return proper matrix limits. Fixes #4780 ([473201908](https://github.com/pixelfed/pixelfed/commit/473201908))
 - Update SearchApiV2Service, fix offset bug. Fixes #5875 ([0a98b7ad2](https://github.com/pixelfed/pixelfed/commit/0a98b7ad2))
 - Update SearchApiV2Service, fix offset bug. Fixes #5875 ([0a98b7ad2](https://github.com/pixelfed/pixelfed/commit/0a98b7ad2))
 - Update ApiV1Controller, add better direct error message. Fixes #4789 ([658fe6898](https://github.com/pixelfed/pixelfed/commit/658fe6898))
 - Update ApiV1Controller, add better direct error message. Fixes #4789 ([658fe6898](https://github.com/pixelfed/pixelfed/commit/658fe6898))
+- Update DiscoverController, improve public hashtag feed. Fixes #5866 ([32fc3180c](https://github.com/pixelfed/pixelfed/commit/32fc3180c))
+- Update report views, fix missing forms ([475d1d627](https://github.com/pixelfed/pixelfed/commit/475d1d627))
+- Update private settings, change "Private Account" to "Manually Review Follow Requests" ([31dd1ab35](https://github.com/pixelfed/pixelfed/commit/31dd1ab35))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 
 ## [v0.12.5 (2025-03-23)](https://github.com/pixelfed/pixelfed/compare/v0.12.5...dev)
 ## [v0.12.5 (2025-03-23)](https://github.com/pixelfed/pixelfed/compare/v0.12.5...dev)

+ 16 - 19
app/Http/Controllers/DiscoverController.php

@@ -57,11 +57,11 @@ class DiscoverController extends Controller
 
 
         $this->validate($request, [
         $this->validate($request, [
             'hashtag' => 'required|string|min:1|max:124',
             'hashtag' => 'required|string|min:1|max:124',
-            'page' => 'nullable|integer|min:1|max:'.($user ? 29 : 3),
+            'page' => 'nullable|integer|min:1',
         ]);
         ]);
 
 
         $page = $request->input('page') ?? '1';
         $page = $request->input('page') ?? '1';
-        $end = $page > 1 ? $page * 9 : 0;
+        $end = $page > 1 ? $page * 9 : (($page * 9) + 9);
         $tag = $request->input('hashtag');
         $tag = $request->input('hashtag');
 
 
         if (config('database.default') === 'pgsql') {
         if (config('database.default') === 'pgsql') {
@@ -80,6 +80,18 @@ class DiscoverController extends Controller
             'name' => $hashtag->name,
             'name' => $hashtag->name,
             'url' => $hashtag->url(),
             'url' => $hashtag->url(),
         ];
         ];
+
+        $res['tags'] = [];
+
+        if ($page >= 8) {
+            if ($user) {
+                if ($page >= 29) {
+                    return $res;
+                }
+            } else {
+                return $res;
+            }
+        }
         if ($user) {
         if ($user) {
             $tags = StatusHashtagService::get($hashtag->id, $page, $end);
             $tags = StatusHashtagService::get($hashtag->id, $page, $end);
             $res['tags'] = collect($tags)
             $res['tags'] = collect($tags)
@@ -99,23 +111,8 @@ class DiscoverController extends Controller
                 })
                 })
                 ->values();
                 ->values();
         } else {
         } else {
-            if ($page != 1) {
-                $res['tags'] = [];
-
-                return $res;
-            }
-            $key = 'discover:tags:public_feed:'.$hashtag->id.':page:'.$page;
-            $tags = Cache::remember($key, 43200, function () use ($hashtag, $page, $end) {
-                return collect(StatusHashtagService::get($hashtag->id, $page, $end))
-                    ->filter(function ($tag) {
-                        if (! $tag['status']['local']) {
-                            return false;
-                        }
-
-                        return true;
-                    })
-                    ->values();
-            });
+            $key = 'discover:tags:public_feed:'.$hashtag->id.':page:'.$page.':end'.$end;
+            $tags = StatusHashtagService::get($hashtag->id, $page, $end);
             $res['tags'] = collect($tags)
             $res['tags'] = collect($tags)
                 ->filter(function ($tag) {
                 ->filter(function ($tag) {
                     if (! StatusService::get($tag['status']['id'])) {
                     if (! StatusService::get($tag['status']['id'])) {

+ 3 - 5
resources/views/report/abusive/comment.blade.php

@@ -31,10 +31,8 @@
             </form>
             </form>
           </div>
           </div>
 
 
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -42,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 3 - 5
resources/views/report/abusive/post.blade.php

@@ -31,10 +31,8 @@
             </form>
             </form>
           </div>
           </div>
 
 
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -42,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 3 - 5
resources/views/report/abusive/profile.blade.php

@@ -31,10 +31,8 @@
             </form>
             </form>
           </div>
           </div>
 
 
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -42,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 3 - 5
resources/views/report/sensitive/comment.blade.php

@@ -31,10 +31,8 @@
             </form>
             </form>
           </div>
           </div>
 
 
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -42,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 3 - 5
resources/views/report/sensitive/post.blade.php

@@ -31,10 +31,8 @@
             </form>
             </form>
           </div>
           </div>
 
 
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -42,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 3 - 5
resources/views/report/sensitive/profile.blade.php

@@ -31,10 +31,8 @@
             </form>
             </form>
           </div>
           </div>
 
 
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -42,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 23 - 22
resources/views/report/spam/comment.blade.php

@@ -9,29 +9,30 @@
         Report Comment Spam
         Report Comment Spam
       </div>
       </div>
       <div class="card-body">
       <div class="card-body">
-        <div class="p-5 text-center">
-          <p class="lead">Please select one of the following options.</p>
-        </div>
         <div class="row">
         <div class="row">
-          <div class="col-12 col-md-8 offset-md-2 my-3">
-            <p><a class="btn btn-light btn-block p-4 font-weight-bold" href="#">
-              This comment contains spam
-            </a></p>
-          </div>
-          <div class="col-12 col-md-8 offset-md-2 my-3">
-            <p><a class="btn btn-light btn-block p-4 font-weight-bold" href="#">
-              This post contains spam
-            </a></p>
+          <div class="col-12 col-md-10 offset-md-1 my-3">
+            <form method="post" action="{{route('report.form')}}">
+              @csrf
+              <input type="hidden" name="report" value="spam"></input>
+              <input type="hidden" name="type" value="{{request()->query('type')}}"></input>
+              <input type="hidden" name="id" value="{{request()->query('id')}}"></input>
+              <div class="form-group row">
+                <label class="col-sm-3 col-form-label font-weight-bold text-right">Message</label>
+                <div class="col-sm-9">
+                  <textarea class="form-control" name="msg" placeholder="Add an optional message for mods/admins" rows="4"></textarea>
+                </div>
+              </div>
+              <hr>
+              <div class="form-group row">
+                <div class="col-12">
+                  <button type="submit" class="btn btn-primary btn-block font-weight-bold">Submit</button>
+                </div>
+              </div>
+            </form>
           </div>
           </div>
-          <div class="col-12 col-md-8 offset-md-2 my-3">
-            <p><a class="btn btn-light btn-block p-4 font-weight-bold" href="#">
-              This users profile contains spam
-            </a></p>
-          </div>
-          <div class="col-12 col-md-8 offset-md-2 my-3">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -39,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 3 - 5
resources/views/report/spam/post.blade.php

@@ -31,10 +31,8 @@
             </form>
             </form>
           </div>
           </div>
 
 
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -42,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 23 - 22
resources/views/report/spam/profile.blade.php

@@ -9,29 +9,30 @@
         Report Profile Spam
         Report Profile Spam
       </div>
       </div>
       <div class="card-body">
       <div class="card-body">
-        <div class="p-5 text-center">
-          <p class="lead">Please select one of the following options.</p>
-        </div>
         <div class="row">
         <div class="row">
-          <div class="col-12 col-md-8 offset-md-2 my-3">
-            <p><a class="btn btn-light btn-block p-4 font-weight-bold" href="#">
-              This comment contains spam
-            </a></p>
-          </div>
-          <div class="col-12 col-md-8 offset-md-2 my-3">
-            <p><a class="btn btn-light btn-block p-4 font-weight-bold" href="#">
-              This post contains spam
-            </a></p>
+          <div class="col-12 col-md-10 offset-md-1 my-3">
+            <form method="post" action="{{route('report.form')}}">
+              @csrf
+              <input type="hidden" name="report" value="spam"></input>
+              <input type="hidden" name="type" value="{{request()->query('type')}}"></input>
+              <input type="hidden" name="id" value="{{request()->query('id')}}"></input>
+              <div class="form-group row">
+                <label class="col-sm-3 col-form-label font-weight-bold text-right">Message</label>
+                <div class="col-sm-9">
+                  <textarea class="form-control" name="msg" placeholder="Add an optional message for mods/admins" rows="4"></textarea>
+                </div>
+              </div>
+              <hr>
+              <div class="form-group row">
+                <div class="col-12">
+                  <button type="submit" class="btn btn-primary btn-block font-weight-bold">Submit</button>
+                </div>
+              </div>
+            </form>
           </div>
           </div>
-          <div class="col-12 col-md-8 offset-md-2 my-3">
-            <p><a class="btn btn-light btn-block p-4 font-weight-bold" href="#">
-              This users profile contains spam
-            </a></p>
-          </div>
-          <div class="col-12 col-md-8 offset-md-2">
-            <p><a class="font-weight-bold" href="#">
-              Learn more
-            </a> about our reporting guidelines and policy.</p>
+
+          <div class="col-12">
+            <p class="text-center small"><a class="font-weight-bold" href="/site/kb/community-guidelines">Learn more</a> about our community guidelines and policies.</p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -39,4 +40,4 @@
   </div>
   </div>
 </div>
 </div>
 
 
-@endsection
+@endsection

+ 2 - 2
resources/views/settings/privacy.blade.php

@@ -21,9 +21,9 @@
     <div class="form-check pb-3">
     <div class="form-check pb-3">
       <input class="form-check-input" type="checkbox" name="is_private" id="is_private" {{$settings->is_private ? 'checked=""':''}}>
       <input class="form-check-input" type="checkbox" name="is_private" id="is_private" {{$settings->is_private ? 'checked=""':''}}>
       <label class="form-check-label font-weight-bold" for="is_private">
       <label class="form-check-label font-weight-bold" for="is_private">
-        {{__('settings.privacy.private_account')}}
+        Manually Review Follow Requests
       </label>
       </label>
-      <p class="text-muted small help-text">{{__('settings.privacy.when_your_account_is_private_only_people_you_etc')}}</p>
+      <p class="text-muted small help-text">When you get a follow request, Pixelfed will not automatically approve it. You can instead manually confirm or deny the follow request. Your existing followers won't be affected.</p>
     </div>
     </div>
 
 
     <div class="form-check pb-3">
     <div class="form-check pb-3">