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> </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>

View File

@ -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);

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 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>';

View File

@ -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",

View File

@ -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",