Update routes

This commit is contained in:
Daniel Supernault 2023-12-16 05:36:59 -07:00
parent 2438324369
commit cef451e588
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1
4 changed files with 64 additions and 72 deletions

View file

@ -8,8 +8,9 @@
<hr> <hr>
<div class="form-group pb-1"> <div class="form-group pb-1">
<p> <p>
<a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.muted-users')}}">Muted Users</a> <a class="btn btn-link py-0 font-weight-bold" href="{{route('settings.privacy.muted-users')}}">Muted Accounts</a>
<a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-users')}}">Blocked Users</a> <a class="btn btn-link py-0 font-weight-bold" href="{{route('settings.privacy.blocked-users')}}">Blocked Accounts</a>
<a class="btn btn-link py-0 font-weight-bold" href="{{route('settings.privacy.domain-blocks')}}">Domain Blocks</a>
</p> </p>
</div> </div>
<form method="post"> <form method="post">

View file

@ -2,40 +2,36 @@
@section('section') @section('section')
<div class="title"> <div class="d-flex justify-content-between align-items-center">
<h3 class="font-weight-bold">Blocked Users</h3> <div class="title d-flex align-items-center" style="gap: 1rem;">
<p class="mb-0"><a href="/settings/privacy"><i class="far fa-chevron-left fa-lg"></i></a></p>
<h3 class="font-weight-bold mb-0">Blocked Accounts</h3>
</div> </div>
<hr>
<div class="form-group pb-1">
<p>
<a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.muted-users')}}">Muted Users</a>
<a class="btn btn-outline-primary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-users')}}">Blocked Users</a>
{{-- <a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-keywords')}}">Blocked keywords</a>
<a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-instances')}}">Blocked instances</a> --}}
</p>
</div> </div>
<hr />
@if($users->count() > 0) @if($users->count() > 0)
<ul class="list-group list-group-flush"> <div class="list-group">
@foreach($users as $user) @foreach($users as $user)
<li class="list-group-item"> <div class="list-group-item">
<div class="d-flex justify-content-between align-items-center font-weight-bold"> <div class="d-flex justify-content-between align-items-center font-weight-bold">
<span><a href="{{$user->url()}}" class="text-decoration-none text-dark"><img class="rounded-circle mr-3" src="{{$user->avatarUrl()}}" width="32px">{{$user->username}}</a></span> <span><a href="{{$user->url()}}" class="text-decoration-none text-dark"><img class="rounded-circle mr-3" src="{{$user->avatarUrl()}}" width="32px" onerror="this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';">{{$user->username}}</a></span>
<span class="btn-group"> <span class="btn-group">
<form method="post"> <form method="post">
@csrf @csrf
<input type="hidden" name="profile_id" value="{{$user->id}}"> <input type="hidden" name="profile_id" value="{{$user->id}}">
<button type="submit" class="btn btn-outline-secondary btn-sm px-3 font-weight-bold">Unblock</button> <button type="submit" class="btn btn-link btn-sm px-3 font-weight-bold">Unblock</button>
</form> </form>
</span> </span>
</div> </div>
</li> </div>
@endforeach @endforeach
</ul> </div>
<div class="d-flex justify-content-center mt-3 font-weight-bold"> <div class="d-flex justify-content-center mt-3 font-weight-bold">
{{$users->links()}} {{$users->links()}}
</div> </div>
@else @else
<p class="lead">You are not blocking any accounts.</p> <p class="lead text-center font-weight-bold">You are not blocking any accounts.</p>
@endif @endif
@endsection @endsection

View file

@ -1,41 +1,35 @@
@extends('settings.template') @extends('settings.template')
@section('section') @section('section')
<div class="d-flex justify-content-between align-items-center">
<div class="title"> <div class="title d-flex align-items-center" style="gap: 1rem;">
<h3 class="font-weight-bold">Muted Users</h3> <p class="mb-0"><a href="/settings/privacy"><i class="far fa-chevron-left fa-lg"></i></a></p>
<h3 class="font-weight-bold mb-0">Muted Accounts</h3>
</div> </div>
<hr>
<div class="form-group pb-1">
<p>
<a class="btn btn-outline-primary py-0 font-weight-bold" href="{{route('settings.privacy.muted-users')}}">Muted Users</a>
<a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-users')}}">Blocked Users</a>
{{-- <a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-keywords')}}">Blocked keywords</a>
<a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-instances')}}">Blocked instances</a> --}}
</p>
</div> </div>
<hr />
@if($users->count() > 0) @if($users->count() > 0)
<ul class="list-group list-group-flush"> <div class="list-group">
@foreach($users as $user) @foreach($users as $user)
<li class="list-group-item"> <div class="list-group-item">
<div class="d-flex justify-content-between align-items-center font-weight-bold"> <div class="d-flex justify-content-between align-items-center font-weight-bold">
<span><a href="{{$user->url()}}" class="text-decoration-none text-dark"><img class="rounded-circle mr-3" src="{{$user->avatarUrl()}}" width="32px">{{$user->username}}</a></span> <span><a href="{{$user->url()}}" class="text-decoration-none text-dark"><img class="rounded-circle mr-3" src="{{$user->avatarUrl()}}" width="32px" onerror="this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';">{{$user->username}}</a></span>
<span class="btn-group"> <span class="btn-group">
<form method="post"> <form method="post">
@csrf @csrf
<input type="hidden" name="profile_id" value="{{$user->id}}"> <input type="hidden" name="profile_id" value="{{$user->id}}">
<button type="submit" class="btn btn-outline-secondary btn-sm px-3 font-weight-bold">Unmute</button> <button type="submit" class="btn btn-link btn-sm px-3 font-weight-bold">Unmute</button>
</form> </form>
</span> </span>
</div> </div>
</li> </div>
@endforeach @endforeach
</ul> </div>
<div class="d-flex justify-content-center mt-3 font-weight-bold"> <div class="d-flex justify-content-center mt-3 font-weight-bold">
{{$users->links()}} {{$users->links()}}
</div> </div>
@else @else
<p class="lead">You are not muting any accounts.</p> <p class="lead text-center font-weight-bold">You are not muting any accounts.</p>
@endif @endif
@endsection @endsection

View file

@ -489,6 +489,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::post('privacy/muted-users', 'SettingsController@mutedUsersUpdate'); Route::post('privacy/muted-users', 'SettingsController@mutedUsersUpdate');
Route::get('privacy/blocked-users', 'SettingsController@blockedUsers')->name('settings.privacy.blocked-users'); Route::get('privacy/blocked-users', 'SettingsController@blockedUsers')->name('settings.privacy.blocked-users');
Route::post('privacy/blocked-users', 'SettingsController@blockedUsersUpdate'); Route::post('privacy/blocked-users', 'SettingsController@blockedUsersUpdate');
Route::get('privacy/domain-blocks', 'SettingsController@domainBlocks')->name('settings.privacy.domain-blocks');
Route::get('privacy/blocked-instances', 'SettingsController@blockedInstances')->name('settings.privacy.blocked-instances'); Route::get('privacy/blocked-instances', 'SettingsController@blockedInstances')->name('settings.privacy.blocked-instances');
Route::post('privacy/blocked-instances', 'SettingsController@blockedInstanceStore'); Route::post('privacy/blocked-instances', 'SettingsController@blockedInstanceStore');
Route::post('privacy/blocked-instances/unblock', 'SettingsController@blockedInstanceUnblock')->name('settings.privacy.blocked-instances.unblock'); Route::post('privacy/blocked-instances/unblock', 'SettingsController@blockedInstanceUnblock')->name('settings.privacy.blocked-instances.unblock');