mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 19:38:20 -07:00
Added Quit App to menu
This commit is contained in:
parent
b0bb836ec7
commit
3c5da3f01b
@ -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);
|
||||
|
||||
|
@ -302,6 +302,11 @@ import Headroom from 'headroom.js';
|
||||
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder btnSettings" data-itemid="settings" href="#"><span class="material-icons navMenuOptionIcon settings"></span><span class="navMenuOptionText">' + globalize.translate('Settings') + '</span></a>';
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder btnLogout" data-itemid="logout" href="#"><span class="material-icons navMenuOptionIcon exit_to_app"></span><span class="navMenuOptionText">' + globalize.translate('ButtonSignOut') + '</span></a>';
|
||||
|
||||
if (appHost.supports('quitapp')) {
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder quitApp" data-itemid="quitapp" href="#"><span class="material-icons navMenuOptionIcon close"></span><span class="navMenuOptionText">' + globalize.translate('ButtonQuitApp') + '</span></a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
|
@ -134,6 +134,7 @@
|
||||
"ButtonShutdown": "Shutdown",
|
||||
"ButtonSignIn": "Sign In",
|
||||
"ButtonSignOut": "Sign Out",
|
||||
"ButtonQuitApp": "Quit Application",
|
||||
"ButtonStart": "Start",
|
||||
"ButtonStop": "Stop",
|
||||
"ButtonSubmit": "Submit",
|
||||
|
@ -106,6 +106,7 @@
|
||||
"ButtonShutdown": "Shutdown",
|
||||
"ButtonSignIn": "Sign In",
|
||||
"ButtonSignOut": "Sign Out",
|
||||
"ButtonQuitApp": "Quit Application",
|
||||
"ButtonSplit": "Split",
|
||||
"ButtonStart": "Start",
|
||||
"ButtonStop": "Stop",
|
||||
|
Loading…
Reference in New Issue
Block a user