File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
resources/themes/pterodactyl/layouts Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 7979 <li ><a href =" {{ route (' index' ) } }" data-toggle =" tooltip" data-placement =" bottom" title =" Exit Admin Control" ><i class =" fa fa-server" ></i ></a ></li >
8080 </li >
8181 <li >
82- <li ><a href =" {{ route (' auth.logout' ) } }" data-toggle =" tooltip" data-placement =" bottom" title =" Logout" ><i class =" fa fa-power-off" ></i ></a ></li >
82+ <li ><a href =" {{ route (' auth.logout' ) } }" id = " logoutButton " data-toggle =" tooltip" data-placement =" bottom" title =" Logout" ><i class =" fa fa-power-off" ></i ></a ></li >
8383 </li >
8484 </ul >
8585 </div >
191191 {!! Theme:: js (' vendor/select2/select2.full.min.js' ) ! !}
192192 {!! Theme:: js (' js/admin/functions.js' ) ! !}
193193 {!! Theme:: js (' js/autocomplete.js' ) ! !}
194+
195+ @if (Auth:: user ()-> isRootAdmin () )
196+ <script >
197+ $ (' #logoutButton' ).on (' click' , function (event ) {
198+ event .preventDefault ();
199+ if (confirm (' Are you sure you want to logout?' )) {
200+ window .location = $ (this ).attr (' href' );
201+ }
202+ });
203+ </script >
204+ @endif
194205 @show
195206 </body >
196207</html >
Original file line number Diff line number Diff line change 8383 </li >
8484 @endif
8585 <li >
86- <li ><a href =" {{ route (' auth.logout' ) } }" data-toggle =" tooltip" data-placement =" bottom" title =" {{ @trans (' strings.logout' ) } }" ><i class =" fa fa-power-off" ></i ></a ></li >
86+ <li ><a href =" {{ route (' auth.logout' ) } }" id = " logoutButton " data-toggle =" tooltip" data-placement =" bottom" title =" {{ @trans (' strings.logout' ) } }" ><i class =" fa fa-power-off" ></i ></a ></li >
8787 </li >
8888 </ul >
8989 </div >
@@ -283,6 +283,17 @@ class="active"
283283 @if (config (' pterodactyl.lang.in_context' ) )
284284 {!! Theme:: js (' vendor/phraseapp/phraseapp.js' ) ! !}
285285 @endif
286+
287+ @if (Auth:: user ()-> isRootAdmin () )
288+ <script >
289+ $ (' #logoutButton' ).on (' click' , function (event ) {
290+ event .preventDefault ();
291+ if (confirm (' Are you sure you want to logout?' )) {
292+ window .location = $ (this ).attr (' href' );
293+ }
294+ });
295+ </script >
296+ @endif
286297 @show
287298 </body >
288299</html >
You can’t perform that action at this time.
0 commit comments