mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 19:38:20 -07:00
Reimplemented Exit App function
This commit is contained in:
parent
3c5da3f01b
commit
c03166ed02
@ -113,11 +113,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="quitApp listItem-border">
|
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="exitApp listItem-border">
|
||||||
<div class="listItem">
|
<div class="listItem">
|
||||||
<span class="material-icons listItemIcon listItemIcon-transparent close"></span>
|
<span class="material-icons listItemIcon listItemIcon-transparent close"></span>
|
||||||
<div class="listItemBody">
|
<div class="listItemBody">
|
||||||
<div class="listItemBodyText">${ButtonQuitApp}</div>
|
<div class="listItemBodyText">${ButtonExitApp}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
@ -17,8 +17,8 @@ export default function (view, params) {
|
|||||||
window.NativeShell.openClientSettings();
|
window.NativeShell.openClientSettings();
|
||||||
});
|
});
|
||||||
|
|
||||||
view.querySelector('.quitApp').addEventListener('click', function () {
|
view.querySelector('.exitApp').addEventListener('click', function () {
|
||||||
window.NativeShell.quitApp();
|
appHost.exit();
|
||||||
});
|
});
|
||||||
|
|
||||||
view.addEventListener('viewshow', function () {
|
view.addEventListener('viewshow', function () {
|
||||||
@ -37,8 +37,8 @@ export default function (view, params) {
|
|||||||
const supportsClientSettings = appHost.supports('clientsettings');
|
const supportsClientSettings = appHost.supports('clientsettings');
|
||||||
page.querySelector('.clientSettings').classList.toggle('hide', !supportsClientSettings);
|
page.querySelector('.clientSettings').classList.toggle('hide', !supportsClientSettings);
|
||||||
|
|
||||||
const supportsQuitApp = appHost.supports('quitapp');
|
const supportsExitMenu = appHost.supports('exitmenu');
|
||||||
page.querySelector('.quitApp').classList.toggle('hide', !supportsQuitApp);
|
page.querySelector('.exitApp').classList.toggle('hide', !supportsExitMenu);
|
||||||
|
|
||||||
const supportsMultiServer = appHost.supports('multiserver');
|
const supportsMultiServer = appHost.supports('multiserver');
|
||||||
page.querySelector('.selectServer').classList.toggle('hide', !supportsMultiServer);
|
page.querySelector('.selectServer').classList.toggle('hide', !supportsMultiServer);
|
||||||
|
@ -303,8 +303,8 @@ 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 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>';
|
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')) {
|
if (appHost.supports('exitmenu')) {
|
||||||
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 += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder exitApp" data-itemid="exitapp" href="#"><span class="material-icons navMenuOptionIcon close"></span><span class="navMenuOptionText">' + globalize.translate('ButtonExitApp') + '</span></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
"ButtonShutdown": "Shutdown",
|
"ButtonShutdown": "Shutdown",
|
||||||
"ButtonSignIn": "Sign In",
|
"ButtonSignIn": "Sign In",
|
||||||
"ButtonSignOut": "Sign Out",
|
"ButtonSignOut": "Sign Out",
|
||||||
"ButtonQuitApp": "Quit Application",
|
"ButtonExitApp": "Exit Application",
|
||||||
"ButtonStart": "Start",
|
"ButtonStart": "Start",
|
||||||
"ButtonStop": "Stop",
|
"ButtonStop": "Stop",
|
||||||
"ButtonSubmit": "Submit",
|
"ButtonSubmit": "Submit",
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
"ButtonShutdown": "Shutdown",
|
"ButtonShutdown": "Shutdown",
|
||||||
"ButtonSignIn": "Sign In",
|
"ButtonSignIn": "Sign In",
|
||||||
"ButtonSignOut": "Sign Out",
|
"ButtonSignOut": "Sign Out",
|
||||||
"ButtonQuitApp": "Quit Application",
|
"ButtonExitApp": "Exit Application",
|
||||||
"ButtonSplit": "Split",
|
"ButtonSplit": "Split",
|
||||||
"ButtonStart": "Start",
|
"ButtonStart": "Start",
|
||||||
"ButtonStop": "Stop",
|
"ButtonStop": "Stop",
|
||||||
|
Loading…
Reference in New Issue
Block a user