Added exit app event handling to library menu

This commit is contained in:
iainsaxonhome 2022-01-17 08:26:26 +11:00
parent 2fc99360bd
commit d1d4ff865d

View File

@ -323,6 +323,11 @@ import Headroom from 'headroom.js';
btnSettings.addEventListener('click', onSettingsClick); btnSettings.addEventListener('click', onSettingsClick);
} }
const btnExit = navDrawerScrollContainer.querySelector('.exitApp');
if (btnExit) {
btnExit.addEventListener('click', onExitAppClick);
}
const btnLogout = navDrawerScrollContainer.querySelector('.btnLogout'); const btnLogout = navDrawerScrollContainer.querySelector('.btnLogout');
if (btnLogout) { if (btnLogout) {
btnLogout.addEventListener('click', onLogoutClick); btnLogout.addEventListener('click', onLogoutClick);
@ -711,6 +716,10 @@ import Headroom from 'headroom.js';
Dashboard.navigate('mypreferencesmenu.html'); Dashboard.navigate('mypreferencesmenu.html');
} }
function onExitAppClick() {
appHost.exit();
}
function onLogoutClick() { function onLogoutClick() {
Dashboard.logout(); Dashboard.logout();
} }