1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
RoboMagus 2025-03-30 11:01:13 -04:00 committed by GitHub
commit 741f023bfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -340,21 +340,28 @@ function askForExit() {
return; return;
} }
import('../utils/dashboard').then(() => {
import('../components/actionSheet/actionSheet').then((actionsheet) => { import('../components/actionSheet/actionSheet').then((actionsheet) => {
const userId = Dashboard.getCurrentUserId();
const logoutEntry = userId ? [{ id: 'logout', name: globalize.translate('ButtonSignOut') }] : [];
exitPromise = actionsheet.show({ exitPromise = actionsheet.show({
title: globalize.translate('MessageConfirmAppExit'), title: globalize.translate('MessageConfirmAppExit'),
items: [ items: [
...logoutEntry,
{ id: 'yes', name: globalize.translate('Yes') }, { id: 'yes', name: globalize.translate('Yes') },
{ id: 'no', name: globalize.translate('No') } { id: 'no', name: globalize.translate('No') }
] ]
}).then(function (value) { }).then(function (value) {
if (value === 'yes') { if (value === 'yes') {
doExit(); doExit();
} else if (value === 'logout') {
Dashboard.logout();
} }
}).finally(function () { }).finally(function () {
exitPromise = null; exitPromise = null;
}); });
}); });
});
} }
let deviceId; let deviceId;