Prechádzať zdrojové kódy

Update security view

Daniel Supernault 5 rokov pred
rodič
commit
0586c022a9

+ 3 - 1
resources/views/settings/security.blade.php

@@ -27,7 +27,7 @@
     
     
     @include('settings.security.device-panel')
     @include('settings.security.device-panel')
 
 
-    @if(config('pixelfed.account_deletion') == true)
+    @if(config('pixelfed.account_deletion') && !$user->is_admin && $user->created_at->gt(now()->subHours(12)))
     <h4 class="font-weight-bold pt-3">Danger Zone</h4>
     <h4 class="font-weight-bold pt-3">Danger Zone</h4>
     <div class="mb-4 border rounded border-danger">
     <div class="mb-4 border rounded border-danger">
       <ul class="list-group mb-0 pb-0">
       <ul class="list-group mb-0 pb-0">
@@ -40,6 +40,7 @@
             <a class="btn btn-outline-danger font-weight-bold py-1" href="{{route('settings.remove.temporary')}}">Disable</a>
             <a class="btn btn-outline-danger font-weight-bold py-1" href="{{route('settings.remove.temporary')}}">Disable</a>
           </div>
           </div>
         </li>
         </li>
+        @if( !$user->is_admin && $user->created_at->gt(now()->subDays(7)) )
         <li class="list-group-item border-left-0 border-right-0 py-3 d-flex justify-content-between">
         <li class="list-group-item border-left-0 border-right-0 py-3 d-flex justify-content-between">
           <div>
           <div>
             <p class="font-weight-bold mb-1">Delete this Account</p>
             <p class="font-weight-bold mb-1">Delete this Account</p>
@@ -49,6 +50,7 @@
             <a class="btn btn-outline-danger font-weight-bold py-1" href="{{route('settings.remove.permanent')}}">Delete</a>
             <a class="btn btn-outline-danger font-weight-bold py-1" href="{{route('settings.remove.permanent')}}">Delete</a>
           </div>
           </div>
         </li>
         </li>
+        @endif
       </ul>
       </ul>
     </div>
     </div>
     @endif
     @endif