File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed
resources/themes/pterodactyl/layouts Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 196196 <script >
197197 $ (' #logoutButton' ).on (' click' , function (event ) {
198198 event .preventDefault ();
199- if (confirm (' Are you sure you want to logout?' )) {
200- window .location = $ (this ).attr (' href' );
201- }
199+
200+ var that = this ;
201+ swal ({
202+ title: ' Do you want to log out?' ,
203+ type: ' warning' ,
204+ showCancelButton: true ,
205+ confirmButtonColor: ' #d9534f' ,
206+ cancelButtonColor: ' #d33' ,
207+ confirmButtonText: ' Log out'
208+ }, function () {
209+ window .location = $ (that).attr (' href' );
210+ });
202211 });
203212 </script >
204213 @endif
Original file line number Diff line number Diff line change @@ -289,9 +289,18 @@ class="active"
289289 <script >
290290 $ (' #logoutButton' ).on (' click' , function (event ) {
291291 event .preventDefault ();
292- if (confirm (' Are you sure you want to logout?' )) {
293- window .location = $ (this ).attr (' href' );
294- }
292+
293+ var that = this ;
294+ swal ({
295+ title: ' Do you want to log out?' ,
296+ type: ' warning' ,
297+ showCancelButton: true ,
298+ confirmButtonColor: ' #d9534f' ,
299+ cancelButtonColor: ' #d33' ,
300+ confirmButtonText: ' Log out'
301+ }, function () {
302+ window .location = $ (that).attr (' href' );
303+ });
295304 });
296305 </script >
297306 @endif
You can’t perform that action at this time.
0 commit comments