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