Reimplemented Exit App function

This commit is contained in:
iainsaxonhome 2022-01-13 08:46:00 +11:00
parent 3c5da3f01b
commit c03166ed02
5 changed files with 10 additions and 10 deletions

View File

@ -113,11 +113,11 @@
</div>
</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">
<span class="material-icons listItemIcon listItemIcon-transparent close"></span>
<div class="listItemBody">
<div class="listItemBodyText">${ButtonQuitApp}</div>
<div class="listItemBodyText">${ButtonExitApp}</div>
</div>
</div>
</a>

View File

@ -17,8 +17,8 @@ export default function (view, params) {
window.NativeShell.openClientSettings();
});
view.querySelector('.quitApp').addEventListener('click', function () {
window.NativeShell.quitApp();
view.querySelector('.exitApp').addEventListener('click', function () {
appHost.exit();
});
view.addEventListener('viewshow', function () {
@ -37,8 +37,8 @@ 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 supportsExitMenu = appHost.supports('exitmenu');
page.querySelector('.exitApp').classList.toggle('hide', !supportsExitMenu);
const supportsMultiServer = appHost.supports('multiserver');
page.querySelector('.selectServer').classList.toggle('hide', !supportsMultiServer);

View File

@ -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 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>';
if (appHost.supports('exitmenu')) {
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>';

View File

@ -134,7 +134,7 @@
"ButtonShutdown": "Shutdown",
"ButtonSignIn": "Sign In",
"ButtonSignOut": "Sign Out",
"ButtonQuitApp": "Quit Application",
"ButtonExitApp": "Exit Application",
"ButtonStart": "Start",
"ButtonStop": "Stop",
"ButtonSubmit": "Submit",

View File

@ -106,7 +106,7 @@
"ButtonShutdown": "Shutdown",
"ButtonSignIn": "Sign In",
"ButtonSignOut": "Sign Out",
"ButtonQuitApp": "Quit Application",
"ButtonExitApp": "Exit Application",
"ButtonSplit": "Split",
"ButtonStart": "Start",
"ButtonStop": "Stop",