Update Settings, remove reports page

This commit is contained in:
Daniel Supernault 2021-05-01 12:40:32 -06:00
parent f2055b4dcd
commit 9cf962fff5
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
4 changed files with 180 additions and 233 deletions

View file

@ -151,13 +151,6 @@ class SettingsController extends Controller
return view('settings.export.show'); return view('settings.export.show');
} }
public function reportsHome(Request $request)
{
$profile = Auth::user()->profile;
$reports = Report::whereProfileId($profile->id)->orderByDesc('created_at')->paginate(10);
return view('settings.reports', compact('reports'));
}
public function metroDarkMode(Request $request) public function metroDarkMode(Request $request)
{ {
$this->validate($request, [ $this->validate($request, [

View file

@ -26,16 +26,9 @@
<li class="nav-item pl-3 {{request()->is('settings/relationships*')?'active':''}}"> <li class="nav-item pl-3 {{request()->is('settings/relationships*')?'active':''}}">
<a class="nav-link font-weight-light text-muted" href="{{route('settings.relationships')}}">Relationships</a> <a class="nav-link font-weight-light text-muted" href="{{route('settings.relationships')}}">Relationships</a>
</li> </li>
<li class="nav-item pl-3 {{request()->is('settings/reports*')?'active':''}}">
<a class="nav-link font-weight-light text-muted" href="{{route('settings.reports')}}">Reports</a>
</li>
<li class="nav-item pl-3 {{request()->is('settings/security*')?'active':''}}"> <li class="nav-item pl-3 {{request()->is('settings/security*')?'active':''}}">
<a class="nav-link font-weight-light text-muted" href="{{route('settings.security')}}">Security</a> <a class="nav-link font-weight-light text-muted" href="{{route('settings.security')}}">Security</a>
</li> </li>
{{-- <li class="nav-item pl-3 {{request()->is('settings/sponsor*')?'active':''}}">
<a class="nav-link font-weight-light text-muted" href="{{route('settings.sponsor')}}">Sponsor</a>
</li> --}}
<li class="nav-item"> <li class="nav-item">
<hr> <hr>
</li> </li>

View file

@ -1,38 +0,0 @@
@extends('settings.template')
@section('section')
<div class="title">
<h3 class="font-weight-bold">Reports</h3>
</div>
<hr>
<p class="lead">A list of reports you have made. </p>
<table class="table table-responsive">
<thead class="bg-light">
<th scope="col">ID</th>
<th scope="col">Type</th>
<th scope="col">Reported</th>
<th scope="col">Status</th>
<th scope="col">Created</th>
</tr>
</thead>
<tbody>
@foreach($reports as $report)
<tr>
<td class="font-weight-bold">{{$report->id}}</td>
<td class="font-weight-bold">{{$report->type}}</td>
<td class="font-weight-bold"><a href="{{$report->reported()->url()}}">{{str_limit($report->reported()->url(), 30)}}</a></td>
@if(!$report->admin_seen)
<td><span class="text-danger font-weight-bold">Unresolved</span></td>
@else
<td><span class="text-success font-weight-bold">Resolved</span></td>
@endif
<td class="font-weight-bold">{{$report->created_at->diffForHumans(null, true, true)}}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="d-flex justify-content-center mt-5 small">
{{$reports->links()}}
</div>
@endsection

View file

@ -351,7 +351,6 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
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');
Route::get('privacy/blocked-keywords', 'SettingsController@blockedKeywords')->name('settings.privacy.blocked-keywords'); Route::get('privacy/blocked-keywords', 'SettingsController@blockedKeywords')->name('settings.privacy.blocked-keywords');
Route::post('privacy/account', 'SettingsController@privateAccountOptions')->name('settings.privacy.account'); Route::post('privacy/account', 'SettingsController@privateAccountOptions')->name('settings.privacy.account');
Route::get('reports', 'SettingsController@reportsHome')->name('settings.reports');
Route::group(['prefix' => 'remove', 'middleware' => 'dangerzone'], function() { Route::group(['prefix' => 'remove', 'middleware' => 'dangerzone'], function() {
Route::get('request/temporary', 'SettingsController@removeAccountTemporary')->name('settings.remove.temporary'); Route::get('request/temporary', 'SettingsController@removeAccountTemporary')->name('settings.remove.temporary');
Route::post('request/temporary', 'SettingsController@removeAccountTemporarySubmit'); Route::post('request/temporary', 'SettingsController@removeAccountTemporarySubmit');