diff --git a/src/scripts/librarymenu.js b/src/scripts/librarymenu.js index b0cd078b7..1de8bc036 100644 --- a/src/scripts/librarymenu.js +++ b/src/scripts/librarymenu.js @@ -178,17 +178,12 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", " var html = ""; html += '
'; html += '' + globalize.translate("ButtonHome") + ""; - html += '
'; - html += '

'; - html += globalize.translate("sharedcomponents#HeaderMyDownloads"); - html += "

"; - html += '' + globalize.translate("sharedcomponents#Browse") + ""; - html += '' + globalize.translate("sharedcomponents#Manage") + ""; - html += "
"; + + // libraries are added here html += '
'; html += "
"; - var localUser = user.localUser; + var localUser = user.localUser; if (localUser && localUser.Policy.IsAdministrator) { html += '
'; html += '

'; @@ -200,26 +195,26 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", " } html += '
'; - + html += '

'; + html += globalize.translate("HeaderUser"); + html += "

"; if (user.localUser) { html += '' + globalize.translate("ButtonSettings") + ""; } - - html += '' + globalize.translate("sharedcomponents#Sync") + ""; - if (AppInfo.isNativeApp) { html += '' + globalize.translate("ButtonSelectServer") + ""; } - - if (!(!user.localUser || user.localUser.EnableAutoLogin)) { + // null check for local user might not be required + if (user.localUser && !user.localUser.EnableAutoLogin) { html += '' + globalize.translate("ButtonSignOut") + ""; } - html += "
"; + + // add buttons to navigation drawer navDrawerScrollContainer.innerHTML = html; + // bind logout button click to method var btnLogout = navDrawerScrollContainer.querySelector(".btnLogout"); - if (btnLogout) { btnLogout.addEventListener("click", onLogoutClick); }