diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 0e56485572..2a582516fb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -15,12 +15,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.113", - "_release": "1.4.113", + "version": "1.4.114", + "_release": "1.4.114", "_resolution": { "type": "version", - "tag": "1.4.113", - "commit": "03c34e718b6b72ec847567dcedb114e32ff8a1f0" + "tag": "1.4.114", + "commit": "cf5d4390c6b08e025aaa3d7086172c483bc440ed" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/input/api.js b/dashboard-ui/bower_components/emby-webcomponents/input/api.js index 56586640a1..751832363b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/input/api.js +++ b/dashboard-ui/bower_components/emby-webcomponents/input/api.js @@ -1,4 +1,4 @@ -define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focusManager'], function (connectionManager, playbackManager, events, inputManager, focusManager) { +define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focusManager', 'embyRouter'], function (connectionManager, playbackManager, events, inputManager, focusManager, embyRouter) { function displayMessage(cmd) { @@ -18,7 +18,14 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus } } - function processGeneralCommand(cmd) { + function displayContent(cmd, apiClient) { + + apiClient.getItem(apiClient.getCurrentUserId(), cmd.ItemId).then(function (item) { + embyRouter.showItem(item); + }); + } + + function processGeneralCommand(cmd, apiClient) { // Full list // https://github.com/MediaBrowser/MediaBrowser/blob/master/MediaBrowser.Model/Session/GeneralCommand.cs#L23 @@ -93,7 +100,7 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus inputManager.trigger('settings'); break; case 'DisplayContent': - //Dashboard.onBrowseCommand(cmd.Arguments); + displayContent(cmd, apiClient); break; case 'GoToSearch': inputManager.trigger('search'); @@ -164,7 +171,7 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus } else if (msg.MessageType === "GeneralCommand") { var cmd = msg.Data; - processGeneralCommand(cmd); + processGeneralCommand(cmd, apiClient); } } @@ -174,10 +181,10 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focus events.on(apiClient, "websocketmessage", onWebSocketMessageReceived); } - //var current = connectionManager.currentApiClient(); - //if (current) { - // bindEvents(current); - //} + var current = connectionManager.currentApiClient(); + if (current) { + bindEvents(current); + } events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js b/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js index d1b4b2b2a7..f905e58703 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/inputmanager.js @@ -116,17 +116,13 @@ define(['playbackManager', 'focusManager', 'embyRouter'], function (playbackMana // TODO break; case 'next': - if (playbackManager.isPlayingVideo()) { - playbackManager.nextChapter(); - } else if (playbackManager.isPlaying()) { + if (playbackManager.isPlaying()) { playbackManager.nextTrack(); } break; case 'previous': - if (playbackManager.isPlayingVideo()) { - playbackManager.previousChapter(); - } else if (playbackManager.isPlaying()) { + if (playbackManager.isPlaying()) { playbackManager.previousTrack(); } break; diff --git a/dashboard-ui/bower_components/emby-webcomponents/librarychangednotifications.js b/dashboard-ui/bower_components/emby-webcomponents/librarychangednotifications.js new file mode 100644 index 0000000000..aad549e8fe --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/librarychangednotifications.js @@ -0,0 +1,117 @@ +define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focusManager', 'embyRouter'], function (connectionManager, playbackManager, events, inputManager, focusManager, embyRouter) { + + function onOneDocumentClick() { + + document.removeEventListener('click', onOneDocumentClick); + document.removeEventListener('keydown', onOneDocumentClick); + + if (window.Notification) { + Notification.requestPermission(); + } + } + document.addEventListener('click', onOneDocumentClick); + document.addEventListener('keydown', onOneDocumentClick); + + function onLibraryChanged(data, apiClient) { + + var newItems = data.ItemsAdded; + + if (!newItems.length || /*AppInfo.isNativeApp ||*/ !window.Notification || Notification.permission !== "granted") { + return; + } + + if (playbackManager.isPlayingVideo()) { + return; + } + + apiClient.getItems(apiClient.getCurrentUserId(), { + + Recursive: true, + Limit: 3, + IsFolder: false, + SortBy: "DateCreated", + SortOrder: "Descending", + ImageTypes: "Primary", + Ids: newItems.join(',') + + }).then(function (result) { + + var items = result.Items; + + for (var i = 0, length = items.length ; i < length; i++) { + + var item = items[i]; + + var notification = { + title: "New " + item.Type, + body: item.Name, + timeout: 15000, + vibrate: true, + + data: { + //options: { + // url: LibraryBrowser.getHref(item) + //} + } + }; + + var imageTags = item.ImageTags || {}; + + if (imageTags.Primary) { + + notification.icon = apiClient.getScaledImageUrl(item.Id, { + width: 80, + tag: imageTags.Primary, + type: "Primary" + }); + } + + var notif = new Notification(notification.title, notification); + + if (notif.show) { + notif.show(); + } + + if (notification.timeout) { + setTimeout(function () { + + if (notif.close) { + notif.close(); + } + else if (notif.cancel) { + notif.cancel(); + } + }, notification.timeout); + } + } + }); + } + + function onWebSocketMessageReceived(e, msg) { + + var apiClient = this; + + if (msg.MessageType === "LibraryChanged") { + var cmd = msg.Data; + onLibraryChanged(cmd, apiClient); + } + } + + function bindEvents(apiClient) { + + if (!apiClient) { + return; + } + + events.off(apiClient, "websocketmessage", onWebSocketMessageReceived); + events.on(apiClient, "websocketmessage", onWebSocketMessageReceived); + } + + bindEvents(connectionManager.currentApiClient()); + + events.on(connectionManager, 'apiclientcreated', function (e, newApiClient) { + + bindEvents(newApiClient); + }); + +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index c7dc4d6af0..dac19e56be 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -29,14 +29,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], - "homepage": "https://github.com/polymerelements/iron-behaviors", + "homepage": "https://github.com/PolymerElements/iron-behaviors", "_release": "1.0.17", "_resolution": { "type": "version", "tag": "v1.0.17", "commit": "ef8e89b5f0aa4e8a6b51ca6491ea453bf395f94f" }, - "_source": "git://github.com/polymerelements/iron-behaviors.git", + "_source": "git://github.com/PolymerElements/iron-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-behaviors" + "_originalSource": "PolymerElements/iron-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index 5320b592cc..cad9543436 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -31,14 +31,14 @@ "web-component-tester": "*" }, "private": true, - "homepage": "https://github.com/Polymer/polymer", + "homepage": "https://github.com/polymer/polymer", "_release": "1.6.0", "_resolution": { "type": "version", "tag": "v1.6.0", "commit": "8715c83bf04a228de00ec662ed43eb6141e61b91" }, - "_source": "git://github.com/Polymer/polymer.git", + "_source": "git://github.com/polymer/polymer.git", "_target": "^1.1.0", - "_originalSource": "Polymer/polymer" + "_originalSource": "polymer/polymer" } \ No newline at end of file diff --git a/dashboard-ui/components/tvproviders/schedulesdirect.js b/dashboard-ui/components/tvproviders/schedulesdirect.js index 3bd5584e14..7d628de9ea 100644 --- a/dashboard-ui/components/tvproviders/schedulesdirect.js +++ b/dashboard-ui/components/tvproviders/schedulesdirect.js @@ -197,7 +197,7 @@ return; } - Dashboard.showModalLoadingMsg(); + Dashboard.showLoadingMsg(); ApiClient.ajax({ type: "GET", @@ -220,7 +220,7 @@ $('#selectListing', page).val(listingsId); } - Dashboard.hideModalLoadingMsg(); + Dashboard.hideLoadingMsg(); }, function (result) { @@ -228,7 +228,7 @@ message: Globalize.translate('ErrorGettingTvLineups') }); refreshListings(''); - Dashboard.hideModalLoadingMsg(); + Dashboard.hideLoadingMsg(); }); } diff --git a/dashboard-ui/css/card.css b/dashboard-ui/css/card.css index 79838727a1..cfa0fa0926 100644 --- a/dashboard-ui/css/card.css +++ b/dashboard-ui/css/card.css @@ -574,53 +574,6 @@ } } -/** homePageSmallBackdropCard */ -.homePageSmallBackdropCard .cardPadder { - padding-bottom: 56.25%; -} - - -.homePageSmallBackdropCard { - width: 50%; -} - -@media all and (min-width: 540px) { - - .homePageSmallBackdropCard { - width: 33.333%; - } -} - -@media all and (min-width: 600px) { - - .homePageSmallBackdropCard { - width: 25%; - } -} - -@media all and (min-width: 800px) { - - .homePageSmallBackdropCard { - width: 20%; - } -} - -@media all and (min-width: 1100px) { - - .homePageSmallBackdropCard { - width: 16.66666666666667%; - } -} - -@media all and (min-width: 1440px) { - - .homePageSmallBackdropCard { - width: 12.5%; - } -} - - - /** horizontalBackdropCard */ .horizontalBackdropCard .cardPadder { padding-bottom: 56.25%; diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 212e0c6d80..0271bfb22d 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -365,9 +365,9 @@ body:not(.dashboardDocument) .btnNotifications { } i.sidebarLinkIcon { - font-size: 24px; - height: 24px; - width: 24px; + font-size: 150%; + height: auto; + width: auto; } .darkDrawer i.sidebarLinkIcon { @@ -441,7 +441,6 @@ body:not(.dashboardDocument) .headerAppsButton { .dashboardDocument .libraryMenuButtonText { font-size: 150%; - margin-left: 1em; } .dashboardDocument .mainDrawerPanelContent { @@ -506,46 +505,4 @@ body:not(.dashboardDocument) .headerAppsButton { .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; - } +} \ No newline at end of file diff --git a/dashboard-ui/scripts/connectlogin.js b/dashboard-ui/scripts/connectlogin.js index 67c88d57be..a1629b80d2 100644 --- a/dashboard-ui/scripts/connectlogin.js +++ b/dashboard-ui/scripts/connectlogin.js @@ -2,16 +2,16 @@ function login(page, username, password) { - Dashboard.showModalLoadingMsg(); + Dashboard.showLoadingMsg(); ConnectionManager.loginToConnect(username, password).then(function () { - Dashboard.hideModalLoadingMsg(); + Dashboard.hideLoadingMsg(); Dashboard.navigate('selectserver.html'); }, function () { - Dashboard.hideModalLoadingMsg(); + Dashboard.hideLoadingMsg(); Dashboard.alert({ message: Globalize.translate('MessageInvalidUser'), @@ -26,7 +26,7 @@ function handleConnectionResult(page, result) { - Dashboard.hideModalLoadingMsg(); + Dashboard.hideLoadingMsg(); switch (result.State) { @@ -75,7 +75,7 @@ function loadAppConnection(page) { - Dashboard.showModalLoadingMsg(); + Dashboard.showLoadingMsg(); ConnectionManager.connect().then(function (result) { @@ -167,7 +167,7 @@ host += ':' + port; } - Dashboard.showModalLoadingMsg(); + Dashboard.showLoadingMsg(); ConnectionManager.connectToAddress(host).then(function (result) { diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index 3c20ef5fe4..45eb6e25f3 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -68,10 +68,10 @@ return Sections.loadLibraryTiles(elem, user, 'backdrop', index, false, showLibraryTileNames); } else if (section == 'smalllibrarytiles') { - return Sections.loadLibraryTiles(elem, user, 'homePageSmallBackdrop', index, false, showLibraryTileNames); + return Sections.loadLibraryTiles(elem, user, 'smallBackdrop', index, false, showLibraryTileNames); } else if (section == 'smalllibrarytiles-automobile') { - return Sections.loadLibraryTiles(elem, user, 'homePageSmallBackdrop', index, true, showLibraryTileNames); + return Sections.loadLibraryTiles(elem, user, 'smallBackdrop', index, true, showLibraryTileNames); } else if (section == 'librarytiles-automobile') { return Sections.loadLibraryTiles(elem, user, 'backdrop', index, true, showLibraryTileNames); diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index b1c945abb3..6f798d33f9 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -835,7 +835,7 @@ return html; }, - shapes: ['square', 'portrait', 'banner', 'smallBackdrop', 'homePageSmallBackdrop', 'backdrop', 'overflowBackdrop', 'overflowPortrait', 'overflowSquare'], + shapes: ['square', 'portrait', 'banner', 'smallBackdrop', 'backdrop', 'overflowBackdrop', 'overflowPortrait', 'overflowSquare'], getPostersPerRow: function (screenWidth) { @@ -881,14 +881,6 @@ if (screenWidth >= 540) return 3; if (screenWidth >= 420) return 2; return 1; - case 'homePageSmallBackdrop': - if (screenWidth >= 1440) return 8; - if (screenWidth >= 1100) return 6; - if (screenWidth >= 800) return 5; - if (screenWidth >= 600) return 4; - if (screenWidth >= 540) return 3; - if (screenWidth >= 420) return 2; - return 1; case 'overflowPortrait': if (screenWidth >= 1000) return 100 / 23; if (screenWidth >= 640) return 100 / 36; @@ -1015,10 +1007,6 @@ else if (options.shape == 'smallBackdrop') { thumbWidth = posterInfo.smallBackdropWidth; } - else if (options.shape == 'homePageSmallBackdrop') { - thumbWidth = posterInfo.homePageSmallBackdropWidth; - posterWidth = posterInfo.homePageSmallBackdropWidth; - } else if (options.shape == 'detailPagePortrait') { posterWidth = 200; } diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 6c4c023653..a53ab21745 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -14,7 +14,7 @@ html += ''; html += ''; - html += ''; + html += ''; html += '