mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge 5f137b174d
into 7d84185d0e
This commit is contained in:
commit
741f023bfd
1 changed files with 20 additions and 13 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue