mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
update menu
This commit is contained in:
parent
5f9a8ff6c2
commit
d6c9993abe
@ -494,3 +494,45 @@ body:not(.dashboardDocument) .btnNotifications {
|
||||
.title-separator {
|
||||
margin: 0 .5em;
|
||||
}
|
||||
|
||||
.adminAppsMenu {
|
||||
position: fixed;
|
||||
top: 5vh !important;
|
||||
left: 2vw !important;
|
||||
padding: 1.5em 1em !important;
|
||||
font-size: 110%;
|
||||
margin: 0 !important;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.adminAppsMenuRow {
|
||||
display: flex;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.adminAppsMenuRow + .adminAppsMenuRow {
|
||||
margin-top: 1.5em !important;
|
||||
border-top: 1px solid #ddd;
|
||||
padding-top: 1em !important;
|
||||
}
|
||||
|
||||
.adminAppsButton{
|
||||
display: block;
|
||||
color: inherit!important;
|
||||
font-weight: normal!important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.adminAppsButton{
|
||||
width: 5.3vw;
|
||||
}
|
||||
|
||||
.adminAppsButton + .adminAppsButton {
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.adminAppsButton paper-icon-button{
|
||||
width: 4.5vh;
|
||||
height: 4.5vh;
|
||||
}
|
||||
|
@ -185,6 +185,64 @@
|
||||
|
||||
function onHeaderAppsButtonClick() {
|
||||
|
||||
require(['dialogHelper'], function (dialogHelper) {
|
||||
|
||||
var dlg = dialogHelper.createDialog({
|
||||
removeOnClose: true,
|
||||
modal: false,
|
||||
autoFocus: false,
|
||||
entryAnimationDuration: 160,
|
||||
exitAnimationDuration: 160
|
||||
});
|
||||
|
||||
dlg.classList.add('ui-body-a');
|
||||
dlg.classList.add('background-theme-a');
|
||||
dlg.classList.add('adminAppsMenu');
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="adminAppsMenuRow">';
|
||||
|
||||
html += '<a class="adminAppsButton" href="home.html">';
|
||||
html += '<paper-icon-button icon="home"></paper-icon-button>';
|
||||
html += '<div>' + Globalize.translate('ButtonHome') + '</div>';
|
||||
html += '</a>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="adminAppsMenuRow">';
|
||||
|
||||
html += '<a class="adminAppsButton" href="edititemmetadata.html">';
|
||||
html += '<paper-icon-button icon="mode-edit"></paper-icon-button>';
|
||||
html += '<div>' + Globalize.translate('ButtonMetadataManager') + '</div>';
|
||||
html += '</a>';
|
||||
html += '<a class="adminAppsButton" href="reports.html">';
|
||||
html += '<paper-icon-button icon="insert-chart"></paper-icon-button>';
|
||||
html += '<div>' + Globalize.translate('ButtonReports') + '</div>';
|
||||
html += '</a>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
dlg.innerHTML = html;
|
||||
document.body.appendChild(dlg);
|
||||
|
||||
var destination;
|
||||
dlg.addEventListener('click', function (e) {
|
||||
var link = parentWithTag(e.target, 'A');
|
||||
if (link) {
|
||||
destination = link.href;
|
||||
dialogHelper.close(dlg);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
dialogHelper.open(dlg).then(function () {
|
||||
if (destination) {
|
||||
Dashboard.navigate(destination);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function bindMenuEvents() {
|
||||
|
Loading…
Reference in New Issue
Block a user