mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
switch to dark library menu
Conflicts: MediaBrowser.WebDashboard/dashboard-ui/css/librarymenu.css
This commit is contained in:
parent
2136b4e83a
commit
8d8b47dd96
2 changed files with 20 additions and 47 deletions
|
@ -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 {
|
||||
|
|
|
@ -286,10 +286,8 @@
|
|||
if (userAtTop) {
|
||||
|
||||
html += '<div class="drawerUserPanel">';
|
||||
html += '<div class="drawerUserPanelInner">';
|
||||
html += '<div class="drawerUserPanelContent">';
|
||||
|
||||
var imgWidth = 60;
|
||||
var imgWidth = 40;
|
||||
|
||||
if (hasUserImage) {
|
||||
var url = user.imageUrl;
|
||||
|
@ -305,8 +303,6 @@
|
|||
html += user.name;
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="index.html" onclick="return LibraryMenu.onLinkClicked(event, this);"><iron-icon icon="home" class="sidebarLinkIcon" style="color:#2196F3;"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonHome') + '</span></a>';
|
||||
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue