mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added Quit App to menu
This commit is contained in:
parent
b0bb836ec7
commit
3c5da3f01b
5 changed files with 23 additions and 0 deletions
|
@ -112,6 +112,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="quitApp listItem-border">
|
||||
<div class="listItem">
|
||||
<span class="material-icons listItemIcon listItemIcon-transparent close"></span>
|
||||
<div class="listItemBody">
|
||||
<div class="listItemBodyText">${ButtonQuitApp}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,6 +17,10 @@ export default function (view, params) {
|
|||
window.NativeShell.openClientSettings();
|
||||
});
|
||||
|
||||
view.querySelector('.quitApp').addEventListener('click', function () {
|
||||
window.NativeShell.quitApp();
|
||||
});
|
||||
|
||||
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 supportsQuitApp = appHost.supports('quitapp');
|
||||
page.querySelector('.quitApp').classList.toggle('hide', !supportsQuitApp);
|
||||
|
||||
const supportsMultiServer = appHost.supports('multiserver');
|
||||
page.querySelector('.selectServer').classList.toggle('hide', !supportsMultiServer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue