mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3318 from iainsaxonhome/feature/quit-app
Added Quit App to main menu
This commit is contained in:
commit
65d8aac0a9
6 changed files with 32 additions and 1 deletions
|
@ -112,6 +112,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="exitApp listItem-border">
|
||||
<div class="listItem">
|
||||
<span class="material-icons listItemIcon listItemIcon-transparent close"></span>
|
||||
<div class="listItemBody">
|
||||
<div class="listItemBodyText">${ButtonExitApp}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,6 +17,10 @@ export default function (view, params) {
|
|||
window.NativeShell.openClientSettings();
|
||||
});
|
||||
|
||||
view.querySelector('.exitApp').addEventListener('click', function () {
|
||||
appHost.exit();
|
||||
});
|
||||
|
||||
view.addEventListener('viewshow', function () {
|
||||
// this page can also be used by admins to change user preferences from the user edit page
|
||||
const userId = params.userId || Dashboard.getCurrentUserId();
|
||||
|
@ -33,6 +37,9 @@ export default function (view, params) {
|
|||
const supportsClientSettings = appHost.supports('clientsettings');
|
||||
page.querySelector('.clientSettings').classList.toggle('hide', !supportsClientSettings);
|
||||
|
||||
const supportsExitMenu = appHost.supports('exitmenu');
|
||||
page.querySelector('.exitApp').classList.toggle('hide', !supportsExitMenu);
|
||||
|
||||
const supportsMultiServer = appHost.supports('multiserver');
|
||||
page.querySelector('.selectServer').classList.toggle('hide', !supportsMultiServer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue