mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update security settings
This commit is contained in:
parent
847e7b7fa4
commit
7d252ea91c
3 changed files with 6 additions and 11 deletions
|
@ -20,19 +20,14 @@ trait SecuritySettings
|
|||
|
||||
public function security()
|
||||
{
|
||||
$sessions = DB::table('sessions')
|
||||
->whereUserId(Auth::id())
|
||||
->limit(20)
|
||||
->get();
|
||||
$user = Auth::user();
|
||||
|
||||
$activity = AccountLog::whereUserId(Auth::id())
|
||||
$activity = AccountLog::whereUserId($user->id)
|
||||
->orderBy('created_at', 'desc')
|
||||
->limit(20)
|
||||
->get();
|
||||
|
||||
$user = Auth::user();
|
||||
|
||||
return view('settings.security', compact('sessions', 'activity', 'user'));
|
||||
return view('settings.security', compact('activity', 'user'));
|
||||
}
|
||||
|
||||
public function securityTwoFactorSetup(Request $request)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
@endif
|
||||
</div>
|
||||
|
||||
@include('settings.security.2fa.partial.log-panel')
|
||||
@include('settings.security.log-panel')
|
||||
</section>
|
||||
|
||||
@endsection
|
|
@ -1,12 +1,12 @@
|
|||
<div class="mb-4 pb-4">
|
||||
<h4 class="font-weight-bold">Account Log</h4>
|
||||
<hr>
|
||||
<ul class="list-group" style="max-height: 400px;overflow-y: scroll;">
|
||||
<ul class="list-group border" style="max-height: 400px;overflow-y: auto;">
|
||||
@if($activity->count() == 0)
|
||||
<p class="alert alert-info font-weight-bold">No activity logs found!</p>
|
||||
@endif
|
||||
@foreach($activity as $log)
|
||||
<li class="list-group-item">
|
||||
<li class="list-group-item rounded-0 border-0">
|
||||
<div class="media">
|
||||
<div class="media-body">
|
||||
<span class="my-0 font-weight-bold text-muted">
|
Loading…
Reference in a new issue