forked from mirror/pixelfed
Update security settings
This commit is contained in:
parent
847e7b7fa4
commit
7d252ea91c
|
@ -20,19 +20,14 @@ trait SecuritySettings
|
||||||
|
|
||||||
public function security()
|
public function security()
|
||||||
{
|
{
|
||||||
$sessions = DB::table('sessions')
|
$user = Auth::user();
|
||||||
->whereUserId(Auth::id())
|
|
||||||
->limit(20)
|
|
||||||
->get();
|
|
||||||
|
|
||||||
$activity = AccountLog::whereUserId(Auth::id())
|
$activity = AccountLog::whereUserId($user->id)
|
||||||
->orderBy('created_at', 'desc')
|
->orderBy('created_at', 'desc')
|
||||||
->limit(20)
|
->limit(20)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$user = Auth::user();
|
return view('settings.security', compact('activity', 'user'));
|
||||||
|
|
||||||
return view('settings.security', compact('sessions', 'activity', 'user'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function securityTwoFactorSetup(Request $request)
|
public function securityTwoFactorSetup(Request $request)
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@include('settings.security.2fa.partial.log-panel')
|
@include('settings.security.log-panel')
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="mb-4 pb-4">
|
<div class="mb-4 pb-4">
|
||||||
<h4 class="font-weight-bold">Account Log</h4>
|
<h4 class="font-weight-bold">Account Log</h4>
|
||||||
<hr>
|
<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)
|
@if($activity->count() == 0)
|
||||||
<p class="alert alert-info font-weight-bold">No activity logs found!</p>
|
<p class="alert alert-info font-weight-bold">No activity logs found!</p>
|
||||||
@endif
|
@endif
|
||||||
@foreach($activity as $log)
|
@foreach($activity as $log)
|
||||||
<li class="list-group-item">
|
<li class="list-group-item rounded-0 border-0">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<span class="my-0 font-weight-bold text-muted">
|
<span class="my-0 font-weight-bold text-muted">
|
Loading…
Reference in New Issue