mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-25 01:33:46 +02:00
Prevent the irritating moment when you logout accidentally when trying to click Admin CP.
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
</li>
|
||||
@endif
|
||||
<li>
|
||||
<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>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -283,6 +283,17 @@
|
||||
@if(config('pterodactyl.lang.in_context'))
|
||||
{!! Theme::js('vendor/phraseapp/phraseapp.js') !!}
|
||||
@endif
|
||||
|
||||
@if(Auth::user()->isRootAdmin())
|
||||
<script>
|
||||
$('#logoutButton').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
if (confirm('Are you sure you want to logout?')) {
|
||||
window.location = $(this).attr('href');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
@show
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user