diff --git a/dashboard-ui/connectlogin.html b/dashboard-ui/connectlogin.html
index c5e7b33dc2..6d5c93c339 100644
--- a/dashboard-ui/connectlogin.html
+++ b/dashboard-ui/connectlogin.html
@@ -3,7 +3,7 @@
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css
index ca6fd53851..fbf98d397c 100644
--- a/dashboard-ui/css/librarybrowser.css
+++ b/dashboard-ui/css/librarybrowser.css
@@ -12,16 +12,16 @@
margin-left: .5em;
}
-.libraryPage {
+.libraryPage[data-theme='b'] {
background-color: #202020;
}
.backdropPage {
- background-color: rgba(15, 15,15, .86) !important;
+ background-color: rgba(20, 20,20, .86) !important;
}
.backdropPage:not(.lightBackdropPage) {
- background-color: rgba(15, 15,15, .94) !important;
+ background-color: rgba(20, 20,20, .94) !important;
}
.backdropContainer {
diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css
index 4b3235f4e9..00a613ab03 100644
--- a/dashboard-ui/css/librarymenu.css
+++ b/dashboard-ui/css/librarymenu.css
@@ -3,7 +3,7 @@
}
.libraryPage:not(.metadataEditorPage):not(.noSecondaryNavPage) {
- padding-top: 100px !important;
+ padding-top: 95px !important;
}
.libraryMenuDivider {
@@ -149,23 +149,19 @@
left: 0;
z-index: 1000;
top: 0;
- background-image: linear-gradient(#262626,#111);
- border-bottom: 1px solid #111;
border-top: 0;
border-left: 0;
border-right: 0;
}
.libraryViewNav {
- height: 48px;
+ height: 45px;
overflow: hidden;
position: fixed;
right: 0;
left: 0;
- top: 51px;
+ top: 50px;
z-index: 1000;
- background-image: linear-gradient(#1a1a1a,#1a1a1a);
- border-bottom: 1px solid #111;
text-align: center;
font-size: 14px;
white-space: nowrap;
@@ -175,6 +171,14 @@
overflow: -moz-scrollbars-none;
}
+.viewMenuBar {
+ background-color: #000;
+}
+
+.libraryViewNav {
+ background-color: #111;
+}
+
.libraryViewNav::-webkit-scrollbar {
height: 0 !important;
display: none;
@@ -182,7 +186,7 @@
.viewMenuLink {
text-decoration: none;
- color: #ccc !important;
+ color: #eee !important;
padding: 7px .5em 6px;
display: inline-block;
vertical-align: middle;
@@ -213,13 +217,13 @@
.viewMenuTextLink {
display: block;
- padding: .6em .5em .6em 38px !important;
- font-size: 15px;
+ padding: .65em .5em .55em 38px !important;
+ font-size: 14px;
font-weight: 300 !important;
font-family: Roboto;
background-repeat: no-repeat;
- background-size: 14px 14px;
- background-position: 13px center;
+ background-size: 13px 13px;
+ background-position: 12px center;
}
.musicViewMenu {
@@ -227,7 +231,10 @@
}
.homeViewMenu {
- background-image: url(images/items/folders/home.png);
+ background-image: url(images/mblogoicon.png);
+ background-size: 39px 26px;
+ background-position: 10px center;
+ padding-left: 60px !important;
}
.tvshowsViewMenu, .livetvViewMenu {
@@ -315,7 +322,7 @@
margin: 0 0;
position: relative;
font-weight: normal;
- border-bottom: 5px solid transparent;
+ border-bottom: 4px solid transparent;
}
.libraryViewNav a:not(.ui-btn-active):hover {
@@ -324,17 +331,7 @@
.libraryViewNavLinkContent {
display: inline-block;
- padding: 2px 15px 2px 15px;
-}
-
-.libraryViewNav a + a .libraryViewNavLinkContent {
- padding-left: 17px;
-}
-
-.libraryViewNav a + a .libraryViewNavLinkContent {
- border-left: 1px solid #333;
- position: relative;
- left: -2px;
+ padding: 1px 13px 1px 13px;
}
@media all and (max-width: 500px) {
diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css
index c5b823bf84..0f617cfcf5 100644
--- a/dashboard-ui/css/notifications.css
+++ b/dashboard-ui/css/notifications.css
@@ -16,7 +16,7 @@
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
- padding: 4px 12px 5px;
+ padding: 4px 12px 4px;
text-align: center;
text-decoration: none !important;
-moz-user-select: none;
diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css
index c858579551..c009b42a37 100644
--- a/dashboard-ui/css/site.css
+++ b/dashboard-ui/css/site.css
@@ -64,10 +64,7 @@ body {
h1, h1 a {
font-weight: 300 !important;
-}
-
-.libraryPage h1, .libraryPage h1 a {
- font-weight: 100 !important;
+ font-size: 24px;
}
.ui-loader h1 {
diff --git a/dashboard-ui/scripts/aboutpage.js b/dashboard-ui/scripts/aboutpage.js
index c6991404bf..9cd8055a79 100644
--- a/dashboard-ui/scripts/aboutpage.js
+++ b/dashboard-ui/scripts/aboutpage.js
@@ -4,12 +4,9 @@
var page = this;
- ApiClient.getSystemInfo().done(function (info) {
+ var elem = $('#appVersionNumber', page);
- var elem = $('#appVersionNumber', page);
-
- elem.html(elem.html().replace('{0}', info.Version));
- });
+ elem.html(elem.html().replace('{0}', ConnectionManager.appVersion()));
});
})(jQuery, document);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/connectlogin.js b/dashboard-ui/scripts/connectlogin.js
index 57913524f9..d5e2891f71 100644
--- a/dashboard-ui/scripts/connectlogin.js
+++ b/dashboard-ui/scripts/connectlogin.js
@@ -2,89 +2,41 @@
function onLoggedIn() {
- ConnectionManager.getServers().done(function (result) {
+ ConnectionManager.connect().done(function (result) {
- if (result.length) {
+ Dashboard.hideLoadingMsg();
- connectToServerInstance(result[0]);
+ switch (result.State) {
- } else {
- Dashboard.alert('Coming soon');
+ case MediaBrowser.ConnectionState.Unavilable:
+ // Login succeeded so this should never happen
+ break;
+ case MediaBrowser.ConnectionState.ServerSelection:
+ window.location = 'selectserver.html';
+ break;
+ case MediaBrowser.ConnectionState.ServerSignIn:
+ // This should never happen in connect mode
+ break;
+ case MediaBrowser.ConnectionState.SignedIn:
+ window.location = 'selectserver.html';
+ break;
+ default:
+ break;
}
});
}
- function connectToServerInstance(server) {
-
- connectToServerAtUrl(server, server.Url).fail(function () {
-
- if (server.LocalAddress) {
- connectToServerAtUrl(server, server.LocalAddress).fail(showServerConnectionFailure);
-
- } else {
- showServerConnectionFailure();
- }
- });
- }
-
- function showServerConnectionFailure() {
- alert('Unable to communicate with your server.');
- }
-
- function connectToServerAtUrl(server, url) {
-
- var exchangeToken = server.AccessKey;
-
- return $.ajax({
-
- type: "GET",
- url: url + "/mediabrowser/Connect/Exchange?format=json&ConnectUserId=" + ConnectionManager.connectUserId(),
- dataType: "json",
-
- error: function () {
- // Don't show normal dashboard errors
- },
- headers: {
- "X-MediaBrowser-Token": exchangeToken
- }
-
-
- }).done(function (result) {
-
- Dashboard.serverAddress(url);
- Dashboard.setCurrentUser(result.LocalUserId, result.AccessToken);
-
- window.location = 'index.html';
-
- });
- }
-
function login(page, username, password) {
- var md5 = CryptoJS.MD5(password).toString();
+ Dashboard.showLoadingMsg();
- $.ajax({
- type: "POST",
- url: "https://connect.mediabrowser.tv/service/user/authenticate",
- data: {
- userName: username,
- password: md5
- },
- dataType: "json",
- contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
-
- error: function () {
- // Don't show normal dashboard errors
- }
-
-
- }).done(function (result) {
-
- ConnectionManager.onConnectAuthenticated(result);
+ ConnectionManager.loginToConnect(username, password).done(function () {
onLoggedIn();
- }).fail(function (result) {
+ }).fail(function () {
+
+ Dashboard.hideLoadingMsg();
Dashboard.alert({
message: Globalize.translate('MessageInvalidUser'),
diff --git a/dashboard-ui/scripts/externalplayer.js b/dashboard-ui/scripts/externalplayer.js
index f3f11b9b48..4517502695 100644
--- a/dashboard-ui/scripts/externalplayer.js
+++ b/dashboard-ui/scripts/externalplayer.js
@@ -422,7 +422,7 @@
closePlayMenu();
- var html = '
';
+ var html = '
';
html += '
';
html += '- ' + Globalize.translate('HeaderSelectExternalPlayer') + '
';
diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js
index 5281dce20b..d4059b0e21 100644
--- a/dashboard-ui/scripts/indexpage.js
+++ b/dashboard-ui/scripts/indexpage.js
@@ -438,7 +438,7 @@
loadlibraryButtons: loadlibraryButtons
};
-})(jQuery, document, ApiClient);
+})(jQuery, document);
(function ($, document) {
@@ -595,4 +595,4 @@
});
-})(jQuery, document);
\ No newline at end of file
+})(jQuery, document);
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index 5af4525fdd..16de2f4b37 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -873,7 +873,7 @@
function onUserDataChanged(userData) {
var cssClass = LibraryBrowser.getUserDataCssClass(userData.Key);
-
+
if (!cssClass) {
return;
}
@@ -904,6 +904,16 @@
}
- $(ApiClient).on('websocketmessage', onWebSocketMessage);
+ function initializeApiClient(apiClient) {
+ $(apiClient).off('websocketmessage.librarylist', onWebSocketMessage).on('websocketmessage.librarylist', onWebSocketMessage);
+ }
+
+ $(function () {
+
+ $(ConnectionManager).on('apiclientcreated', function (e, apiClient) {
+
+ initializeApiClient(apiClient);
+ });
+ });
})(jQuery, document, window);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js
index 0680532935..6132073d23 100644
--- a/dashboard-ui/scripts/librarymenu.js
+++ b/dashboard-ui/scripts/librarymenu.js
@@ -23,25 +23,31 @@
html += '';
html += '
';
html += '';
-
+
html += '';
html += '