1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

display server name in dashboard

This commit is contained in:
Luke Pulverenti 2015-01-18 14:53:34 -05:00
parent 3c745ff362
commit 1509f3805d
14 changed files with 169 additions and 87 deletions

View file

@ -11,8 +11,7 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="#" data-role="button" class="ui-btn-active">${TabGeneral}</a> <a href="#" data-role="button" class="ui-btn-active">${TabGeneral}</a>
<a href="notificationsettings.html" data-role="button">${TabNotifications}</a> <a href="serversecurity.html" data-role="button">${TabSecurity}</a>
<a href="scheduledtasks.html" data-role="button">${TabScheduledTasks}</a>
</div> </div>
<form id="advancedConfigurationForm"> <form id="advancedConfigurationForm">

View file

@ -559,7 +559,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
} }
.ui-page-theme-a .detailSectionHeader { .ui-page-theme-a .detailSectionHeader {
background-color: #e9e9e9; background-color: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 2px; border-radius: 2px;
} }
@ -644,7 +644,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
} }
} }
@media all and (max-width: 750px) { @media all and (max-width: 800px) {
.editorMenuLink { .editorMenuLink {
display: none; display: none;

View file

@ -265,14 +265,14 @@
} }
} }
@media all and (min-width: 750px) { @media all and (min-width: 800px) {
.dashboardDocument .dashboardMenuButton { .dashboardDocument .dashboardMenuButton {
display: none; display: none;
} }
} }
@media all and (max-width: 750px) { @media all and (max-width: 800px) {
.dashboardDocument .libraryMenuButton { .dashboardDocument .libraryMenuButton {
display: none; display: none;

View file

@ -320,49 +320,93 @@ h1 .imageLink {
border: 0; border: 0;
display: none; display: none;
text-align: left; text-align: left;
width: 220px; width: 240px;
position: fixed; position: fixed;
top: 51px; top: 51px;
left: 0; left: 0;
bottom: 0; bottom: 0;
margin: 0; margin: 0;
overflow-x: hidden;
overflow-y: auto;
border-right: 1px solid #e0e0e0;
/*-moz-box-shadow: -3px 0 10px 0 #555;
-webkit-box-shadow: -3px 0 10px 0 #555;
box-shadow: -3px 0 10px 0 #555;*/
}
.ui-page-theme-a {
background: #f2f2f2;
}
.ui-page-theme-a .content-secondary {
background: #fff;
} }
.sidebarLinks { .sidebarLinks {
margin-top: 2.75em; margin-top: 1.5em;
margin-left: 1em; padding-bottom: 50px;
} }
.sidebarLinks a { .sidebarLinks a {
display: block; display: block;
padding: .6em 20px .6em 20px; padding: .6em 20px .6em 0;
text-decoration: none; text-decoration: none;
color: inherit !important; color: inherit !important;
text-shadow: none !important; text-shadow: none !important;
font-weight: 500 !important; font-weight: 500 !important;
font-size: 14px; font-size: 14px;
border-radius: 2px; vertical-align: middle;
} }
.sidebarLinks a:hover { .sidebarLinks a:hover {
background: #52B54B; background: #f2f2f2;
color: #fff !important;
} }
.sidebarLinks a.selectedSidebarLink { .sidebarLinks a.selectedSidebarLink {
margin-right: 0;
}
.ui-page-theme-a .sidebarLinks a.selectedSidebarLink {
background: #f2f2f2 !important;
}
.ui-page-theme-b .sidebarLinks a.selectedSidebarLink {
background: #38c !important; background: #38c !important;
color: #fff !important; color: #fff !important;
margin-right: 0; }
.sidebarLinks .sidebarLinkIcon {
font-size: 17px;
width: 66px;
text-align: center;
}
.ui-page-theme-a .sidebarLinkIcon {
color: #666;
} }
.sidebarDivider { .sidebarDivider {
height: 0; height: 0;
border-width: 1px 0 0; border-width: 1px 0 0;
border-style: solid; border-style: solid;
margin: .25em 0; margin: .7em 0;
border-radius: 0; border-radius: 0;
} }
.sidebarLinkText, .sidebarLinkIcon {
}
.sidebarHeader {
padding-left: 20px;
margin: 1em 0;
font-size: 90%;
}
.ui-page-theme-a .sidebarHeader {
color: #888;
}
.invalidEntry { .invalidEntry {
background-color: lightpink !important; background-color: lightpink !important;
} }
@ -439,7 +483,7 @@ h1 .imageLink {
} }
} }
@media all and (min-width: 750px) { @media all and (min-width: 800px) {
/* /*
Forms Forms
@ -465,7 +509,7 @@ h1 .imageLink {
.content-primary { .content-primary {
padding: 80px 15px 3em 0; padding: 80px 15px 3em 0;
margin: 0 0 0 260px; margin: 0 0 0 280px;
} }
.content-primary ul:first-child { .content-primary ul:first-child {

View file

@ -12,7 +12,6 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="#" data-role="button" class="ui-btn-active">${TabDashboard}</a> <a href="#" data-role="button" class="ui-btn-active">${TabDashboard}</a>
<a href="dashboardgeneral.html" data-role="button">${TabSettings}</a> <a href="dashboardgeneral.html" data-role="button">${TabSettings}</a>
<a href="serversecurity.html" data-role="button">${TabSecurity}</a>
</div> </div>
<div class="dashboardContent"> <div class="dashboardContent">
<div class="ui-bar-a welcomeMessage" style="display: none; padding: 2em; border-radius: 10px; margin: 2em 0; font-weight: normal; max-width: 800px;"> <div class="ui-bar-a welcomeMessage" style="display: none; padding: 2em; border-radius: 10px; margin: 2em 0; font-weight: normal; max-width: 800px;">

View file

@ -12,7 +12,6 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="dashboard.html" data-role="button">${TabDashboard}</a> <a href="dashboard.html" data-role="button">${TabDashboard}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabSettings}</a> <a href="#" data-role="button" class="ui-btn-active">${TabSettings}</a>
<a href="serversecurity.html" data-role="button">${TabSecurity}</a>
</div> </div>
<form class="dashboardGeneralForm"> <form class="dashboardGeneralForm">

View file

@ -1,20 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${TitleAdvanced}</title> <title>${TitleNotifications}</title>
</head> </head>
<body> <body>
<div id="notificationSettingPage" data-role="page" class="page type-interior advancedConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Notifications"> <div id="notificationSettingPage" data-role="page" class="page type-interior notificationConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Notifications">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="advanced.html" data-role="button">${TabGeneral}</a>
<a href="notificationsettings.html" data-role="button" class="ui-btn-active">${TabNotifications}</a>
<a href="scheduledtasks.html" data-role="button">${TabScheduledTasks}</a>
</div>
<h2 class="notificationType" style="margin-bottom: 0;"></h2> <h2 class="notificationType" style="margin-bottom: 0;"></h2>
<form class="notificationSettingForm"> <form class="notificationSettingForm">

View file

@ -1,20 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${TitleAdvanced}</title> <title>${TitleNotifications}</title>
</head> </head>
<body> <body>
<div id="notificationSettingsPage" data-role="page" class="page type-interior advancedConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Notifications"> <div id="notificationSettingsPage" data-role="page" class="page type-interior notificationConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Notifications">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="advanced.html" data-role="button">${TabGeneral}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabNotifications}</a>
<a href="scheduledtasks.html" data-role="button">${TabScheduledTasks}</a>
</div>
<div class="readOnlyContent"> <div class="readOnlyContent">
<p>${HeaderNotificationList}</p> <p>${HeaderNotificationList}</p>
<p>${SendNotificationHelp}</p> <p>${SendNotificationHelp}</p>

View file

@ -1,19 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${TitleAdvanced}</title> <title>${TitleScheduledTasks}</title>
</head> </head>
<body> <body>
<div id="scheduledTaskPage" data-role="page" class="page type-interior advancedConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks"> <div id="scheduledTaskPage" data-role="page" class="page type-interior scheduledTasksConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="advanced.html" data-role="button">${TabGeneral}</a>
<a href="notificationsettings.html" data-role="button">${TabNotifications}</a>
<a href="scheduledtasks.html" data-role="button" class="ui-btn-active">${TabScheduledTasks}</a>
</div>
<div class="readOnlyContent"> <div class="readOnlyContent">
<h2 class="taskName"></h2> <h2 class="taskName"></h2>
<p id="pTaskDescription"></p> <p id="pTaskDescription"></p>

View file

@ -1,19 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${TitleAdvanced}</title> <title>${TitleScheduledTasks}</title>
</head> </head>
<body> <body>
<div id="scheduledTasksPage" data-role="page" class="page type-interior advancedConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks"> <div id="scheduledTasksPage" data-role="page" class="page type-interior scheduledTasksConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Scheduled%20tasks">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="advanced.html" data-role="button">${TabGeneral}</a>
<a href="notificationsettings.html" data-role="button">${TabNotifications}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabScheduledTasks}</a>
</div>
<div class="readOnlyContent"> <div class="readOnlyContent">
<p>${ScheduledTasksHelp}</p> <p>${ScheduledTasksHelp}</p>
<div id="divScheduledTasks"></div> <div id="divScheduledTasks"></div>

View file

@ -4,6 +4,15 @@
function loadPage(page, config, languageOptions) { function loadPage(page, config, languageOptions) {
if (Dashboard.lastSystemInfo) {
Dashboard.setPageTitle(Dashboard.lastSystemInfo.ServerName);
}
ApiClient.getSystemInfo().done(function (systemInfo) {
Dashboard.setPageTitle(systemInfo.ServerName);
});
$('#txtServerName', page).val(config.ServerName || ''); $('#txtServerName', page).val(config.ServerName || '');
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) { $('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {

View file

@ -6,6 +6,10 @@
var page = this; var page = this;
if (Dashboard.lastSystemInfo) {
Dashboard.setPageTitle(Dashboard.lastSystemInfo.ServerName);
}
DashboardPage.newsStartIndex = 0; DashboardPage.newsStartIndex = 0;
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
@ -73,6 +77,7 @@
ApiClient.getSystemInfo().done(function (systemInfo) { ApiClient.getSystemInfo().done(function (systemInfo) {
Dashboard.setPageTitle(systemInfo.ServerName);
Dashboard.updateSystemInfo(systemInfo); Dashboard.updateSystemInfo(systemInfo);
$('#appVersionNumber', page).html(Globalize.translate('LabelVersionNumber').replace('{0}', systemInfo.Version)); $('#appVersionNumber', page).html(Globalize.translate('LabelVersionNumber').replace('{0}', systemInfo.Version));

View file

@ -665,30 +665,43 @@ var Dashboard = {
html += '<div class="sidebarLinks">'; html += '<div class="sidebarLinks">';
var links = Dashboard.getToolsMenuLinks(page); var items = Dashboard.getToolsMenuLinks(page);
var i, length, link; var i, length, item;
for (i = 0, length = links.length; i < length; i++) { for (i = 0, length = items.length; i < length; i++) {
link = links[i]; item = items[i];
if (!user.Policy.IsAdministrator) { if (!user.Policy.IsAdministrator) {
break; break;
} }
if (link.divider) { if (item.divider) {
html += "<div class='sidebarDivider ui-bar-inherit'></div>"; html += "<div class='sidebarDivider ui-bar-inherit'></div>";
} }
if (link.href) { if (item.href) {
if (link.selected) { var style = item.color ? ' style="color:' + item.color + '"' : '';
html += '<a class="selectedSidebarLink" href="' + link.href + '">' + link.name + '</a>';
if (item.selected) {
html += '<a class="selectedSidebarLink" href="' + item.href + '">';
} else { } else {
html += '<a href="' + link.href + '">' + link.name + '</a>'; html += '<a href="' + item.href + '">';
} }
html += '<span class="fa ' + item.icon + ' sidebarLinkIcon"' + style + '></span>';
html += '<span class="sidebarLinkText">';
html += item.name;
html += '</span>';
html += '</a>';
} else {
html += '<div class="sidebarHeader">';
html += item.name;
html += '</div>';
} }
} }
@ -702,24 +715,24 @@ var Dashboard = {
html += '<p class="libraryPanelHeader" style="margin: 15px 0 15px 15px;"><a href="index.html" class="imageLink"><img src="css/images/mblogoicon.png" /><span style="color:#333;">MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a></p>'; html += '<p class="libraryPanelHeader" style="margin: 15px 0 15px 15px;"><a href="index.html" class="imageLink"><img src="css/images/mblogoicon.png" /><span style="color:#333;">MEDIA</span><span class="mediaBrowserAccent">BROWSER</span></a></p>';
for (i = 0, length = links.length; i < length; i++) { for (i = 0, length = items.length; i < length; i++) {
link = links[i]; item = items[i];
if (!user.Policy.IsAdministrator) { if (!user.Policy.IsAdministrator) {
break; break;
} }
if (link.divider) { if (item.divider) {
html += "<div class='dashboardPanelDivider'></div>"; html += "<div class='dashboardPanelDivider'></div>";
} }
if (link.href) { if (item.href) {
if (link.selected) { if (item.selected) {
html += '<a class="selectedDashboardPanelLink dashboardPanelLink" href="' + link.href + '">' + link.name + '</a>'; html += '<a class="selectedDashboardPanelLink dashboardPanelLink" href="' + item.href + '">' + item.name + '</a>';
} else { } else {
html += '<a class="dashboardPanelLink" href="' + link.href + '">' + link.name + '</a>'; html += '<a class="dashboardPanelLink" href="' + item.href + '">' + item.name + '</a>';
} }
} }
@ -739,58 +752,97 @@ var Dashboard = {
return [{ return [{
name: Globalize.translate('TabServer'), name: Globalize.translate('TabServer'),
href: "dashboard.html", href: "dashboard.html",
selected: page.hasClass("dashboardHomePage") selected: page.hasClass("dashboardHomePage"),
icon: 'fa-dashboard',
color: '#38c'
}, { }, {
name: Globalize.translate('TabDevices'), name: Globalize.translate('TabDevices'),
href: "devices.html", href: "devices.html",
selected: page.hasClass("devicesPage") selected: page.hasClass("devicesPage"),
icon: 'fa-tablet',
color: '#ECA403'
}, { }, {
name: Globalize.translate('TabUsers'), name: Globalize.translate('TabUsers'),
href: "userprofiles.html", href: "userprofiles.html",
selected: page.hasClass("userProfilesPage") selected: page.hasClass("userProfilesPage"),
icon: 'fa-users',
color: '#679C34'
}, { }, {
name: Globalize.translate('TabLibrary'), name: Globalize.translate('TabLibrary'),
divider: true, divider: true,
href: "library.html", href: "library.html",
selected: page.hasClass("mediaLibraryPage") selected: page.hasClass("mediaLibraryPage"),
icon: 'fa-film'
}, { }, {
name: Globalize.translate('TabMetadata'), name: Globalize.translate('TabMetadata'),
href: "metadata.html", href: "metadata.html",
selected: page.hasClass('metadataConfigurationPage') selected: page.hasClass('metadataConfigurationPage'),
icon: 'fa-file-text'
}, { }, {
name: Globalize.translate('TabPlayback'), name: Globalize.translate('TabPlayback'),
href: "playbackconfiguration.html", href: "playbackconfiguration.html",
selected: page.hasClass('playbackConfigurationPage') selected: page.hasClass('playbackConfigurationPage'),
icon: 'fa-play-circle'
}, { }, {
name: Globalize.translate('TabSync'), name: Globalize.translate('TabSync'),
href: "syncactivity.html", href: "syncactivity.html",
selected: page.hasClass('syncConfigurationPage') selected: page.hasClass('syncConfigurationPage'),
icon: 'fa-cloud'
}, { }, {
divider: true, divider: true,
name: Globalize.translate('TabExtras')
}, {
name: Globalize.translate('TabAutoOrganize'), name: Globalize.translate('TabAutoOrganize'),
href: "autoorganizelog.html", href: "autoorganizelog.html",
selected: page.hasClass("organizePage") selected: page.hasClass("organizePage"),
icon: 'fa-files-o',
color: '#01C0DD'
}, { }, {
name: Globalize.translate('TabDLNA'), name: Globalize.translate('TabDLNA'),
href: "dlnasettings.html", href: "dlnasettings.html",
selected: page.hasClass("dlnaPage") selected: page.hasClass("dlnaPage"),
icon: 'fa-film',
color: '#E5342E'
}, { }, {
name: Globalize.translate('TabLiveTV'), name: Globalize.translate('TabLiveTV'),
href: "livetvstatus.html", href: "livetvstatus.html",
selected: page.hasClass("liveTvSettingsPage") selected: page.hasClass("liveTvSettingsPage"),
icon: 'fa-video-camera',
color: '#293AAE'
}, {
name: Globalize.translate('TabNotifications'),
href: "notificationsettings.html",
selected: page.hasClass("notificationConfigurationPage"),
icon: 'fa-wifi',
color: 'brown'
}, { }, {
name: Globalize.translate('TabPlugins'), name: Globalize.translate('TabPlugins'),
href: "plugins.html", href: "plugins.html",
selected: page.hasClass("pluginConfigurationPage") selected: page.hasClass("pluginConfigurationPage"),
icon: 'fa-plus-circle',
color: '#9D22B1'
}, {
divider: true,
name: Globalize.translate('TabExpert')
}, { }, {
name: Globalize.translate('TabAdvanced'), name: Globalize.translate('TabAdvanced'),
divider: true,
href: "advanced.html", href: "advanced.html",
selected: page.hasClass("advancedConfigurationPage") selected: page.hasClass("advancedConfigurationPage"),
icon: 'fa-gears',
color: '#F16834'
}, {
name: Globalize.translate('TabScheduledTasks'),
href: "scheduledtasks.html",
selected: page.hasClass("scheduledTasksConfigurationPage"),
icon: 'fa-clock-o',
color: '#38c'
}, { }, {
name: Globalize.translate('TabHelp'), name: Globalize.translate('TabHelp'),
divider: true,
href: "support.html", href: "support.html",
selected: pageElem.id == "supportPage" || pageElem.id == "logPage" || pageElem.id == "supporterPage" || pageElem.id == "supporterKeyPage" || pageElem.id == "aboutPage" selected: pageElem.id == "supportPage" || pageElem.id == "logPage" || pageElem.id == "supporterPage" || pageElem.id == "supporterKeyPage" || pageElem.id == "aboutPage",
icon: 'fa-info-circle',
color: '#679C34'
}]; }];
}, },

View file

@ -1,23 +1,22 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>${TitleServer}</title> <title>${TitleAdvanced}</title>
</head> </head>
<body> <body>
<div id="serverSecurityPage" data-role="page" class="page type-interior dashboardHomePage"> <div id="serverSecurityPage" data-role="page" class="page type-interior advancedConfigurationPage">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="dashboard.html" data-role="button">${TabDashboard}</a> <a href="advanced.html" data-role="button">${TabGeneral}</a>
<a href="dashboardgeneral.html" data-role="button">${TabSettings}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabSecurity}</a> <a href="#" data-role="button" class="ui-btn-active">${TabSecurity}</a>
</div> </div>
<h2 style="margin-top: -10px;"> <h2 style="margin-top: -10px;">
<span>${HeaderApiKeys}</span> <span>${HeaderApiKeys}</span>
<button class="btnNewKey" style="float: right; margin: -4px 0 0; vertical-align: top;" data-icon="plus" data-mini="true" data-inline="true" type="button">${ButtonNew}</button> <button class="btnNewKey" style="margin: -4px 0 0 2em; vertical-align: top;" data-icon="plus" data-mini="true" data-inline="true" type="button">${ButtonNew}</button>
</h2> </h2>
<p>${HeaderApiKeysHelp}</p> <p>${HeaderApiKeysHelp}</p>
<br /> <br />