diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 606e8b10ab..1c8665fc41 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -79,7 +79,6 @@ .mainDrawer { height: auto !important; - border-right: 1px solid #e0e0e0; } .mainDrawerContent { @@ -355,29 +354,11 @@ } .drawerUserPanel { - background: url(images/splash720.jpg); - background-size: cover; - background-position: center center; - margin-bottom: 1em; - position: relative; color: #fff; - height: 140px; -} - -.drawerUserPanelInner { - background-color: rgba(0, 0, 0, .70); - position: absolute; - top: 0; - right: 0; - left: 0; - bottom: 0; -} - -.drawerUserPanelContent { - color: #fff; - font-weight: 500; - padding: 1.1em; + padding: 1em 1.2em; font-size: 14px; + display: flex; + align-items: center; } .drawerUserPanelUserImage { @@ -385,12 +366,10 @@ background-repeat: no-repeat; background-position: center center; border-radius: 1000px; - vertical-align: middle; } .drawerUserPanelUserName { - padding-top: 1.5em; - padding-left: .35em; + padding-left: 1em; } .libraryDocument .dashboardDrawerContent { @@ -418,7 +397,9 @@ body:not(.dashboardDocument) .btnNotifications { } .darkDrawer { - background-color: #282828 !important; + background-color: rgba(30,30,30,1) !important; + backdrop-filter: brightness(1.5) blur(4px); + box-shadow: none !important; } .darkDrawer .sidebarLinkIcon { @@ -435,7 +416,7 @@ body:not(.dashboardDocument) .btnNotifications { } .darkDrawer .sidebarDivider { - background: #555 !important; + background: #303030 !important; } .darkDrawer .sidebarLink:hover { diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 445e87ae8e..4f9c547e25 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -286,10 +286,8 @@ if (userAtTop) { html += '
'; - html += '
'; - html += '
'; - var imgWidth = 60; + var imgWidth = 40; if (hasUserImage) { var url = user.imageUrl; @@ -305,8 +303,6 @@ html += user.name; html += '
'; - html += '
'; - html += '
'; html += ''; html += '' + Globalize.translate('ButtonHome') + ''; @@ -845,21 +841,6 @@ document.body.classList.remove('dashboardDocument'); document.body.classList.add('hideMainDrawer'); } - - // Set drawer background color - var darkDrawer = false; - if (!Dashboard.isConnectMode() && !browserInfo.mobile) { - darkDrawer = true; - } - - var drawer = document.querySelector('.mainDrawerPanel #drawer'); - if (drawer) { - if (darkDrawer) { - drawer.classList.add('darkDrawer'); - } else { - drawer.classList.remove('darkDrawer'); - } - } }); function updateTitle(page) { @@ -939,6 +920,14 @@ initializeApiClient(window.ApiClient); } + function setDrawerClass() { + + var drawer = document.querySelector('.mainDrawerPanel #drawer'); + if (drawer) { + drawer.classList.add('darkDrawer'); + } + } + var mainDrawerPanel = document.querySelector('.mainDrawerPanel'); mainDrawerPanel.addEventListener('iron-select', onMainDrawerSelect); @@ -951,6 +940,7 @@ Events.on(ConnectionManager, 'localusersignedin', function (e, user) { requiresLibraryMenuRefresh = true; requiresDrawerRefresh = true; + setDrawerClass(); ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(updateUserInHeader); }); @@ -964,6 +954,8 @@ updateCastIcon(); }); + setDrawerClass(); + })(window, document, jQuery, window.devicePixelRatio); (function () {