From c03166ed02b2a6bb59339b9914b368d7636bb52c Mon Sep 17 00:00:00 2001 From: iainsaxonhome Date: Thu, 13 Jan 2022 08:46:00 +1100 Subject: [PATCH] Reimplemented Exit App function --- src/controllers/user/menu/index.html | 4 ++-- src/controllers/user/menu/index.js | 8 ++++---- src/scripts/libraryMenu.js | 4 ++-- src/strings/en-gb.json | 2 +- src/strings/en-us.json | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/controllers/user/menu/index.html b/src/controllers/user/menu/index.html index 39b6c57cc9..66a07f2a14 100644 --- a/src/controllers/user/menu/index.html +++ b/src/controllers/user/menu/index.html @@ -113,11 +113,11 @@ - +
-
${ButtonQuitApp}
+
${ButtonExitApp}
diff --git a/src/controllers/user/menu/index.js b/src/controllers/user/menu/index.js index 4e707af742..f9443c92d1 100644 --- a/src/controllers/user/menu/index.js +++ b/src/controllers/user/menu/index.js @@ -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); diff --git a/src/scripts/libraryMenu.js b/src/scripts/libraryMenu.js index 18e3800031..0fe49e86ec 100644 --- a/src/scripts/libraryMenu.js +++ b/src/scripts/libraryMenu.js @@ -303,8 +303,8 @@ import Headroom from 'headroom.js'; html += '' + globalize.translate('Settings') + ''; html += '' + globalize.translate('ButtonSignOut') + ''; - if (appHost.supports('quitapp')) { - html += '' + globalize.translate('ButtonQuitApp') + ''; + if (appHost.supports('exitmenu')) { + html += '' + globalize.translate('ButtonExitApp') + ''; } html += ''; diff --git a/src/strings/en-gb.json b/src/strings/en-gb.json index 416daa815b..116692d50f 100644 --- a/src/strings/en-gb.json +++ b/src/strings/en-gb.json @@ -134,7 +134,7 @@ "ButtonShutdown": "Shutdown", "ButtonSignIn": "Sign In", "ButtonSignOut": "Sign Out", - "ButtonQuitApp": "Quit Application", + "ButtonExitApp": "Exit Application", "ButtonStart": "Start", "ButtonStop": "Stop", "ButtonSubmit": "Submit", diff --git a/src/strings/en-us.json b/src/strings/en-us.json index bdf4a4bfc7..fe75c835c9 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -106,7 +106,7 @@ "ButtonShutdown": "Shutdown", "ButtonSignIn": "Sign In", "ButtonSignOut": "Sign Out", - "ButtonQuitApp": "Quit Application", + "ButtonExitApp": "Exit Application", "ButtonSplit": "Split", "ButtonStart": "Start", "ButtonStop": "Stop",