mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Add Settings entry to the navigation drawer
This commit is contained in:
parent
9115a4e1fa
commit
3b9ca3c1a3
@ -243,15 +243,20 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" data-itemid="selectserver" href="selectserver.html?showuser=1"><i class="material-icons navMenuOptionIcon">wifi</i><span class="navMenuOptionText">' + globalize.translate("ButtonSelectServer") + "</span></a>";
|
||||
}
|
||||
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder btnSettings" data-itemid="settings" href="#"><i class="material-icons navMenuOptionIcon settings"></i><span class="navMenuOptionText">' + globalize.translate("ButtonSettings") + "</span></a>";
|
||||
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder btnLogout" data-itemid="logout" href="#"><i class="material-icons navMenuOptionIcon exit_to_app"></i><span class="navMenuOptionText">' + globalize.translate("ButtonSignOut") + "</span></a>";
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
// add buttons to navigation drawer
|
||||
navDrawerScrollContainer.innerHTML = html;
|
||||
// bind logout button click to method
|
||||
var btnLogout = navDrawerScrollContainer.querySelector(".btnLogout");
|
||||
|
||||
var btnSettings = navDrawerScrollContainer.querySelector(".btnSettings");
|
||||
if (btnSettings) {
|
||||
btnSettings.addEventListener("click", onSettingsClick);
|
||||
}
|
||||
|
||||
var btnLogout = navDrawerScrollContainer.querySelector(".btnLogout");
|
||||
if (btnLogout) {
|
||||
btnLogout.addEventListener("click", onLogoutClick);
|
||||
}
|
||||
@ -598,6 +603,10 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
}
|
||||
}
|
||||
|
||||
function onSettingsClick() {
|
||||
Dashboard.navigate("mypreferencesmenu.html");
|
||||
}
|
||||
|
||||
function onLogoutClick() {
|
||||
Dashboard.logout();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user