From b2fa34662d6e2a5fee135665fc11f98438a331b5 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 12 Aug 2016 11:54:37 -0400 Subject: [PATCH] update sync menus --- .../emby-webcomponents/.bower.json | 8 +-- .../emby-webcomponents/cardbuilder/card.css | 8 ++- .../cardbuilder/cardbuilder.js | 2 +- .../emby-button/emby-button.css | 8 ++- .../emby-webcomponents/itemcontextmenu.js | 24 +++++++- .../metadataeditor/metadataeditor.js | 4 +- .../multiselect/multiselect.js | 41 +++++++++++-- .../emby-webcomponents/strings/ar.json | 2 + .../emby-webcomponents/strings/bg-BG.json | 2 + .../emby-webcomponents/strings/ca.json | 2 + .../emby-webcomponents/strings/cs.json | 2 + .../emby-webcomponents/strings/da.json | 2 + .../emby-webcomponents/strings/de.json | 2 + .../emby-webcomponents/strings/el.json | 2 + .../emby-webcomponents/strings/en-GB.json | 2 + .../emby-webcomponents/strings/en-US.json | 4 +- .../emby-webcomponents/strings/es-AR.json | 2 + .../emby-webcomponents/strings/es-MX.json | 2 + .../emby-webcomponents/strings/es.json | 2 + .../emby-webcomponents/strings/fi.json | 2 + .../emby-webcomponents/strings/fr-CA.json | 2 + .../emby-webcomponents/strings/fr.json | 2 + .../emby-webcomponents/strings/gsw.json | 2 + .../emby-webcomponents/strings/he.json | 2 + .../emby-webcomponents/strings/hr.json | 2 + .../emby-webcomponents/strings/hu.json | 2 + .../emby-webcomponents/strings/id.json | 2 + .../emby-webcomponents/strings/it.json | 2 + .../emby-webcomponents/strings/kk.json | 2 + .../emby-webcomponents/strings/ko.json | 2 + .../emby-webcomponents/strings/ms.json | 2 + .../emby-webcomponents/strings/nb.json | 2 + .../emby-webcomponents/strings/nl.json | 2 + .../emby-webcomponents/strings/pl.json | 2 + .../emby-webcomponents/strings/pt-BR.json | 2 + .../emby-webcomponents/strings/pt-PT.json | 2 + .../emby-webcomponents/strings/ro.json | 2 + .../emby-webcomponents/strings/ru.json | 2 + .../emby-webcomponents/strings/sk.json | 2 + .../emby-webcomponents/strings/sl-SI.json | 2 + .../emby-webcomponents/strings/sv.json | 2 + .../emby-webcomponents/strings/tr.json | 2 + .../emby-webcomponents/strings/uk.json | 2 + .../emby-webcomponents/strings/vi.json | 2 + .../emby-webcomponents/strings/zh-CN.json | 2 + .../emby-webcomponents/strings/zh-HK.json | 2 + .../emby-webcomponents/strings/zh-TW.json | 2 + dashboard-ui/css/dashboard.css | 19 ++---- dashboard-ui/css/librarybrowser.css | 8 +++ dashboard-ui/itemdetails.html | 2 + dashboard-ui/scripts/dashboardpage.js | 2 +- dashboard-ui/scripts/homeupcoming.js | 6 +- dashboard-ui/scripts/itemdetailpage.js | 46 ++++++++++++-- dashboard-ui/scripts/livetvrecordings.js | 3 +- dashboard-ui/scripts/livetvsuggested.js | 9 +-- dashboard-ui/scripts/mediacontroller.js | 60 ------------------- dashboard-ui/scripts/moviesrecommended.js | 16 ++++- dashboard-ui/scripts/musicrecommended.js | 22 +++---- dashboard-ui/scripts/tvrecommended.js | 5 +- dashboard-ui/scripts/tvupcoming.js | 6 +- dashboard-ui/serviceworker.js | 32 +++++----- .../thirdparty/paper-button-style.css | 6 +- 62 files changed, 275 insertions(+), 144 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index dcaa9f0f8d..85572521e0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -14,12 +14,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.4.167", - "_release": "1.4.167", + "version": "1.4.168", + "_release": "1.4.168", "_resolution": { "type": "version", - "tag": "1.4.167", - "commit": "03c12f1c7360d863dc0ec55491a292a3f64fb400" + "tag": "1.4.168", + "commit": "feb02354eb53d74eba763c538b70435da37cb9aa" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css index 63f395289c..c560904334 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css +++ b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/card.css @@ -132,10 +132,16 @@ justify-content: center; position: relative; background-clip: content-box !important; - border-radius: 2px; color: #fff; } +@media all and (min-width: 600px) { + + .cardImageContainer { + border-radius: 2px; + } +} + .visualCardBox .cardImageContainer { border-radius: 0; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js index e9eea380b0..39e66cfd4b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js +++ b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js @@ -1079,7 +1079,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo outerCardFooter = getCardFooterText(item, options, showTitle, imgUrl, footerCssClass, progressHtml, true); } - if (outerCardFooter && !options.cardLayout) { + if (outerCardFooter && !options.cardLayout && options.allowBottomPadding !== false) { cardBoxClass += ' cardBox-bottompadded'; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css index ba50387be8..b66d87d135 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css @@ -30,7 +30,12 @@ text-transform: uppercase; } - .emby-button.raised, .emby-button.fab { + .emby-button.raised { + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); + text-transform: none; + } + + .emby-button.fab { box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); } @@ -141,7 +146,6 @@ position: relative; overflow: hidden; font-weight: 500; - text-transform: uppercase; border-radius: 50%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); justify-content: center; diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index e12211edd7..e9a8e68af4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -206,12 +206,21 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', if (isMobileApp && options.sync !== false) { if (itemHelper.canSync(user, item)) { commands.push({ - name: globalize.translate('sharedcomponents#Sync'), + name: globalize.translate('sharedcomponents#SyncToOtherDevice'), id: 'sync' }); } } + if (appHost.supports('sync') && options.syncLocal !== false) { + if (itemHelper.canSync(user, item)) { + commands.push({ + name: globalize.translate('sharedcomponents#MakeAvailableOffline'), + id: 'synclocal' + }); + } + } + if (options.openAlbum !== false && item.AlbumId) { commands.push({ name: Globalize.translate('sharedcomponents#ViewAlbum'), @@ -425,6 +434,19 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', getResolveFunction(resolve, id)(); break; } + case 'synclocal': + { + require(['syncDialog'], function (syncDialog) { + syncDialog.showMenu({ + items: [ + { + Id: itemId + }] + }); + }); + getResolveFunction(resolve, id)(); + break; + } case 'removefromplaylist': apiClient.ajax({ diff --git a/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js b/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js index 6f66da06a9..2f2006f5e2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js @@ -271,7 +271,9 @@ editImages: true, editSubtitles: true, sync: false, - share: false + share: false, + play: false, + queue: false }).then(function (result) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js index 8798753d82..437cdbdd75 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js +++ b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js @@ -241,6 +241,13 @@ ironIcon: 'call-merge' }); + if (user.Policy.EnableSync && appHost.supports('sync')) { + menuItems.push({ + name: globalize.translate('sharedcomponents#MakeAvailableOffline'), + id: 'synclocal' + }); + } + menuItems.push({ name: globalize.translate('sharedcomponents#MarkPlayed'), id: 'markplayed' @@ -257,12 +264,14 @@ ironIcon: 'refresh' }); - menuItems.push({ - name: globalize.translate('sharedcomponents#Sync'), - id: 'sync', - ironIcon: 'sync' - }); - dispatchNeedsRefresh(); + if (user.Policy.EnableSync) { + menuItems.push({ + name: globalize.translate('sharedcomponents#SyncToOtherDevice'), + id: 'sync', + ironIcon: 'sync' + }); + } + require(['actionsheet'], function (actionsheet) { actionsheet.show({ @@ -284,6 +293,7 @@ }); }); hideSelections(); + dispatchNeedsRefresh(); break; case 'playlist': require(['playlistEditor'], function (playlistEditor) { @@ -293,12 +303,14 @@ }); }); hideSelections(); + dispatchNeedsRefresh(); break; case 'delete': deleteItems(items).then(function () { embyRouter.goHome(); }); hideSelections(); + dispatchNeedsRefresh(); break; case 'groupvideos': combineVersions(apiClient, items); @@ -308,12 +320,14 @@ apiClient.markPlayed(apiClient.getCurrentUserId(), itemId); }); hideSelections(); + dispatchNeedsRefresh(); break; case 'markunplayed': items.forEach(function (itemId) { apiClient.markUnplayed(apiClient.getCurrentUserId(), itemId); }); hideSelections(); + dispatchNeedsRefresh(); break; case 'refresh': require(['refreshDialog'], function (refreshDialog) { @@ -323,6 +337,7 @@ }).show(); }); hideSelections(); + dispatchNeedsRefresh(); break; case 'sync': require(['syncDialog'], function (syncDialog) { @@ -335,6 +350,20 @@ }); }); hideSelections(); + dispatchNeedsRefresh(); + break; + case 'synclocal': + require(['syncDialog'], function (syncDialog) { + syncDialog.showMenu({ + items: items.map(function (i) { + return { + Id: i + }; + }) + }); + }); + hideSelections(); + dispatchNeedsRefresh(); break; default: break; diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json index 03ba1cd918..223e6476e4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json b/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json index 52e30dc4d9..74d17d17bd 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/bg-BG.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "\u0414\u043e\u0431\u0430\u0432\u0438", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json index 3d92ccb68f..8fbbba05a1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Afegeix", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json index 6c879a0270..649d634997 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "P\u0159idat", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json index f1704d74ae..8090728ec6 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Del", "Add": "Tilf\u00f8j", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json index 76eaeabd2a..a7c9a38e5e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Mit einem anderen Ger\u00e4t synchronisieren", + "MakeAvailableOffline": "Offline verf\u00fcgbar machen", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Teilen", "Add": "Hinzuf\u00fcgen", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json index ccca6fd00c..5340f4095b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "\u03a0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c3\u03b5", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json index d36a2fe797..1f7a0c84e3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-GB.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json index f6c6d58a3d..18daf90681 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json @@ -246,5 +246,7 @@ "HeaderIdentifyItemHelp": "Enter one or more search criteria. Remove criteria to increase search results.", "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", - "SearchResults": "Search Results" + "SearchResults": "Search Results", + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json index ea748ae09b..ddb256f0b7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-AR.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json index 7d4f9822f1..f6e79d9920 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Especial - {0}", "Share": "Compartir", "Add": "Agregar", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json index 1eff6f8d79..29a3cca9cb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Compartir", "Add": "A\u00f1adir", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json index 21410846e0..2a9f33705f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json index 6bffb895ce..cb0a5a605a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-CA.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json index 854fdbae4f..09ab6aaa60 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Sp\u00e9cial - {0}", "Share": "Partager", "Add": "Ajouter", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json index ae678f9305..72f3366fd8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json index 7aa3145135..cb7a908b0c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "\u05d4\u05d5\u05e1\u05e3", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json index abec11a148..4f6889db85 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Dodaj", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json index fe147ac95b..7dc94e1c96 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Hozz\u00e1ad", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json index 57e42cb86a..50d65d5ecb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json index b23e03593f..cfd44c410e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Aggiungi", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json index da1a183dce..b2e0fc9068 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "\u0410\u0440\u043d\u0430\u0439\u044b - {0}", "Share": "\u041e\u0440\u0442\u0430\u049b\u0442\u0430\u0441\u0443", "Add": "\u04ae\u0441\u0442\u0435\u0443", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json index 7b524516c3..9bea6d0901 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "\ucd94\uac00", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json index 6bffb895ce..cb0a5a605a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json index 0ecbabf404..e70c9174e3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Spesial - {0}", "Share": "Del", "Add": "Legg til", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json index 9cf17aec67..608b7ae49e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Speciaal - {0}", "Share": "Delen", "Add": "Toevoegen", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json index 20de50254b..73e7cd6a34 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Dodaj", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json index 6e43a47cf6..b583e26ded 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-BR.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Especial - {0}", "Share": "Compartilhar", "Add": "Adicionar", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json index 47a99ba71f..57997fa4c1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-PT.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Especial - {0}", "Share": "Partilhar", "Add": "Adicionar", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json index 005e9b4cf5..eeb683787b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json index d42262ca02..0fdfdb8b85 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "\u0421\u043f\u0435\u0446\u044d\u043f\u0438\u0437\u043e\u0434 - {0}", "Share": "\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f", "Add": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json index 6bffb895ce..cb0a5a605a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json index 605d9c4236..5bb50660ed 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-SI.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json index 021177ad89..e3edaaf6e5 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Specialavsnitt - {0}", "Share": "Dela", "Add": "L\u00e4gg till", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json index 843aca3ee4..858e5b3b0e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Ekle", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json index 48cfb0bd18..3485644291 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Add", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json index fc96f799f6..f1f7ab6d01 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "Th\u00eam", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json index 560f0739f4..096c8464c4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-CN.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "\u6dfb\u52a0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json index 458f10212c..15c44e0d48 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-HK.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Share", "Add": "\u65b0\u589e", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json index f6915f252c..1366928597 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-TW.json @@ -1,4 +1,6 @@ { + "SyncToOtherDevice": "Sync to other device", + "MakeAvailableOffline": "Make available offline", "ValueSpecialEpisodeName": "Special - {0}", "Share": "\u5206\u4eab", "Add": "\u6dfb\u52a0", diff --git a/dashboard-ui/css/dashboard.css b/dashboard-ui/css/dashboard.css index 1fab04f397..42786b0c24 100644 --- a/dashboard-ui/css/dashboard.css +++ b/dashboard-ui/css/dashboard.css @@ -685,18 +685,13 @@ a[data-role='button'], .type-interior button:not([data-role='none']):not(.clearB display: inline-block; } -.activeSession { - width: 50%; -} - .activeSession .cardBox { - -moz-box-shadow: 0 2px 4px rgba(0,0,0,0.1); - -ms-box-shadow: 0 2px 4px rgba(0,0,0,0.1); - -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.1); - box-shadow: 0 2px 4px rgba(0,0,0,0.1); - border: 0 !important; +@media all and (min-width: 420px) { + + .activeSession { + width: 50% !important; } - +} .sessionNowPlayingContent { background-size: cover; @@ -878,10 +873,6 @@ a[data-role='button'], .type-interior button:not([data-role='none']):not(.clearB .sessionAppName { max-width: 150px; } - - .activeSession { - width: 100%; - } } .disabledUser { diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 322123ee6f..10b94b61fd 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -998,3 +998,11 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { width: 16.666666666666666666666666666667% !important; } } + +.btnSyncComplete { + background: #673AB7 !important; +} + +.btnSyncComplete i { + border-radius: 1000px; +} diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 69ce28a9eb..43f607d688 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -33,6 +33,7 @@ +
@@ -51,6 +52,7 @@ +
diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 53d2848e82..db749c51ea 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -309,7 +309,7 @@ var nowPlayingItem = session.NowPlayingItem; - var className = nowPlayingItem ? 'scalableCard card activeSession' : 'scalableCard card activeSession'; + var className = nowPlayingItem ? 'scalableCard card activeSession backdropCard' : 'scalableCard card activeSession backdropCard'; if (session.TranscodingInfo && session.TranscodingInfo.CompletionPercentage) { className += ' transcodingSession'; diff --git a/dashboard-ui/scripts/homeupcoming.js b/dashboard-ui/scripts/homeupcoming.js index a5e749fd10..94ab1825c8 100644 --- a/dashboard-ui/scripts/homeupcoming.js +++ b/dashboard-ui/scripts/homeupcoming.js @@ -99,7 +99,10 @@ html += '
'; html += '

' + group.name + '

'; + var allowBottomPadding = true; + if (enableScrollX()) { + allowBottomPadding = false; html += '
'; } else { html += '
'; @@ -116,7 +119,8 @@ centerText: true, context: 'home-upcoming', overlayMoreButton: true, - showParentTitle: true + showParentTitle: true, + allowBottomPadding: allowBottomPadding }); html += '
'; diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 76eaab1a56..11c5445753 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1,4 +1,4 @@ -define(['layoutManager', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'userdataButtons', 'dom', 'indicators', 'scrollStyles', 'emby-itemscontainer'], function (layoutManager, cardBuilder, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper, userdataButtons, dom, indicators) { +define(['layoutManager', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'userdataButtons', 'dom', 'indicators', 'apphost', 'scrollStyles', 'emby-itemscontainer'], function (layoutManager, cardBuilder, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper, userdataButtons, dom, indicators, appHost) { var currentItem; @@ -63,16 +63,41 @@ function getContextMenuOptions(item, button) { - return { + var options = { item: item, open: false, play: false, queue: false, playAllFromHere: false, queueAllFromHere: false, - sync: false, positionTo: button }; + + if (appHost.supports('sync')) { + // Will be displayed via button + options.syncLocal = false; + } else { + // Will be displayed via button + options.sync = false; + } + + return options; + } + + function updateSyncStatus(page, item) { + + var i, length; + var elems = page.querySelectorAll('.btnSyncLocal'); + for (i = 0, length = elems.length; i < length; i++) { + + if (item.SyncPercent == 100) { + elems[i].querySelector('i').innerHTML = 'offline_pin'; + elems[i].classList.add('btnSyncComplete'); + } else { + elems[i].querySelector('i').innerHTML = 'file_download'; + elems[i].classList.remove('btnSyncComplete'); + } + } } function reloadFromItem(page, params, item) { @@ -143,9 +168,17 @@ } if (itemHelper.canSync(user, item)) { - hideAll(page, 'btnSync', true); + if (appHost.supports('sync')) { + hideAll(page, 'btnSyncLocal', true); + hideAll(page, 'btnSync'); + } else { + hideAll(page, 'btnSyncLocal'); + hideAll(page, 'btnSync', true); + } + updateSyncStatus(page, item); } else { hideAll(page, 'btnSync'); + hideAll(page, 'btnSyncLocal'); } if (item.Type == 'Program' && item.TimerId) { @@ -2083,6 +2116,11 @@ elems[i].addEventListener('click', onSyncClick); } + elems = view.querySelectorAll('.btnSyncLocal'); + for (i = 0, length = elems.length; i < length; i++) { + elems[i].addEventListener('click', onSyncClick); + } + elems = view.querySelectorAll('.btnRecord,.btnFloatingRecord'); for (i = 0, length = elems.length; i < length; i++) { elems[i].addEventListener('click', onRecordClick); diff --git a/dashboard-ui/scripts/livetvrecordings.js b/dashboard-ui/scripts/livetvrecordings.js index d7f73dd73e..2550b970b2 100644 --- a/dashboard-ui/scripts/livetvrecordings.js +++ b/dashboard-ui/scripts/livetvrecordings.js @@ -83,7 +83,8 @@ showParentTitle: true, coverImage: true, lazy: true, - cardLayout: true + cardLayout: true, + allowBottomPadding: !enableScrollX() }); ImageLoader.lazyChildren(recordingItems); diff --git a/dashboard-ui/scripts/livetvsuggested.js b/dashboard-ui/scripts/livetvsuggested.js index 85b011ed5c..198080aa36 100644 --- a/dashboard-ui/scripts/livetvsuggested.js +++ b/dashboard-ui/scripts/livetvsuggested.js @@ -108,7 +108,8 @@ overlayText: false, lazy: true, overlayMoreButton: overlayButton != 'play', - overlayPlayButton: overlayButton == 'play' + overlayPlayButton: overlayButton == 'play', + allowBottomPadding: !enableScrollX() }); var elem = page.querySelector('.' + sectionClass); @@ -199,12 +200,6 @@ var mdlTabs = view.querySelector('.libraryViewNav'); - var baseUrl = 'tv.html'; - var topParentId = params.topParentId; - if (topParentId) { - baseUrl += '?topParentId=' + topParentId; - } - libraryBrowser.configurePaperLibraryTabs(view, mdlTabs, view.querySelectorAll('.pageTabContent'), [0, 2, 3, 4]); mdlTabs.addEventListener('tabchange', function (e) { diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index 7372b10061..a7c9ef2745 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -213,60 +213,6 @@ MediaController.enableDisplayMirroring(this.checked); } - function bindKeys(controller) { - - var self = this; - var keyResult = {}; - - self.keyBinding = function (e) { - - if (bypass()) return; - - console.log("keyCode", e.keyCode); - - if (keyResult[e.keyCode]) { - e.preventDefault(); - keyResult[e.keyCode](e); - } - }; - - self.keyPrevent = function (e) { - - if (bypass()) return; - - var codes = [32, 38, 40, 37, 39, 81, 77, 65, 84, 83, 70]; - - if (codes.indexOf(e.keyCode) != -1) { - e.preventDefault(); - } - }; - - keyResult[32] = function () { // spacebar - - var player = controller.getCurrentPlayer(); - - player.getPlayerState().then(function (result) { - - var state = result; - - if (state.NowPlayingItem && state.PlayState) { - if (state.PlayState.IsPaused) { - player.unpause(); - } else { - player.pause(); - } - } - }); - }; - - var bypass = function () { - // Get active elem to see what type it is - var active = document.activeElement; - var type = active.type || active.tagName.toLowerCase(); - return (type === "text" || type === "select" || type === "textarea" || type == "password"); - }; - } - function mediaController() { var self = this; @@ -274,12 +220,6 @@ var currentTargetInfo; var players = []; - var keys = new bindKeys(self); - - window.addEventListener('keydown', keys.keyBinding); - window.addEventListener('keypress', keys.keyPrevent); - window.addEventListener('keyup', keys.keyPrevent); - self.registerPlayer = function (player) { players.push(player); diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js index b982b87acc..de8257c886 100644 --- a/dashboard-ui/scripts/moviesrecommended.js +++ b/dashboard-ui/scripts/moviesrecommended.js @@ -27,12 +27,15 @@ ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) { + var allowBottomPadding = !enableScrollX(); + var container = page.querySelector('#recentlyAddedItems'); cardBuilder.buildCards(items, { itemsContainer: container, shape: getPortraitShape(), scalable: true, - overlayPlayButton: true + overlayPlayButton: true, + allowBottomPadding: allowBottomPadding }); }); } @@ -65,13 +68,16 @@ page.querySelector('#resumableSection').classList.add('hide'); } + var allowBottomPadding = !enableScrollX(); + var container = page.querySelector('#resumableItems'); cardBuilder.buildCards(result.Items, { itemsContainer: container, preferThumb: true, shape: getThumbShape(), scalable: true, - overlayPlayButton: true + overlayPlayButton: true, + allowBottomPadding: allowBottomPadding }); }); @@ -104,7 +110,10 @@ html += '
'; html += '

' + title + '

'; + var allowBottomPadding = true; + if (enableScrollX()) { + allowBottomPadding = false; html += '
'; } else { html += '
'; @@ -113,7 +122,8 @@ html += cardBuilder.getCardsHtml(recommendation.Items, { shape: getPortraitShape(), scalable: true, - overlayPlayButton: true + overlayPlayButton: true, + allowBottomPadding: allowBottomPadding }); html += '
'; diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js index 76cf1bd84a..5de0a0777e 100644 --- a/dashboard-ui/scripts/musicrecommended.js +++ b/dashboard-ui/scripts/musicrecommended.js @@ -43,7 +43,8 @@ showParentTitle: true, lazy: true, centerText: true, - overlayPlayButton: true + overlayPlayButton: true, + allowBottomPadding: !enableScrollX() }); ImageLoader.lazyChildren(elem); @@ -89,7 +90,8 @@ action: 'instantmix', lazy: true, centerText: true, - overlayMoreButton: true + overlayMoreButton: true, + allowBottomPadding: !enableScrollX() }); ImageLoader.lazyChildren(itemsContainer); @@ -135,7 +137,8 @@ action: 'instantmix', lazy: true, centerText: true, - overlayMoreButton: true + overlayMoreButton: true, + allowBottomPadding: !enableScrollX() }); ImageLoader.lazyChildren(itemsContainer); @@ -177,7 +180,8 @@ coverImage: true, showItemCounts: true, centerText: true, - overlayPlayButton: true + overlayPlayButton: true, + allowBottomPadding: !enableScrollX() }); ImageLoader.lazyChildren(itemsContainer); @@ -243,10 +247,6 @@ return browserInfo.mobile && AppInfo.enableAppLayouts; } - function getThumbShape() { - return enableScrollX() ? 'overflowBackdrop' : 'backdrop'; - } - self.initTab = function () { var tabContent = view.querySelector('.pageTabContent[data-index=\'' + 0 + '\']'); @@ -351,12 +351,6 @@ var mdlTabs = view.querySelector('.libraryViewNav'); - var baseUrl = 'music.html'; - var topParentId = params.topParentId; - if (topParentId) { - baseUrl += '?topParentId=' + topParentId; - } - libraryBrowser.configurePaperLibraryTabs(view, mdlTabs, view.querySelectorAll('.pageTabContent'), [0, 4, 5, 6]); mdlTabs.addEventListener('beforetabchange', function (e) { diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index 4e22e93f8c..46689b7063 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -88,6 +88,8 @@ view.querySelector('#resumableSection').classList.add('hide'); } + var allowBottomPadding = !enableScrollX(); + var container = view.querySelector('#resumableItems'); cardBuilder.buildCards(result.Items, { itemsContainer: container, @@ -98,7 +100,8 @@ showParentTitle: true, overlayText: false, centerText: true, - overlayPlayButton: true + overlayPlayButton: true, + allowBottomPadding: allowBottomPadding }); }); } diff --git a/dashboard-ui/scripts/tvupcoming.js b/dashboard-ui/scripts/tvupcoming.js index 7bd9d2d1eb..c1e40c9c77 100644 --- a/dashboard-ui/scripts/tvupcoming.js +++ b/dashboard-ui/scripts/tvupcoming.js @@ -101,7 +101,10 @@ html += '
'; html += '

' + group.name + '

'; + var allowBottomPadding = true; + if (enableScrollX()) { + allowBottomPadding = false; html += '
'; } else { html += '
'; @@ -117,7 +120,8 @@ showDetailsMenu: true, centerText: true, overlayMoreButton: true, - showParentTitle: true + showParentTitle: true, + allowBottomPadding: allowBottomPadding }); html += '
'; diff --git a/dashboard-ui/serviceworker.js b/dashboard-ui/serviceworker.js index 299f9b9362..12229506f9 100644 --- a/dashboard-ui/serviceworker.js +++ b/dashboard-ui/serviceworker.js @@ -50,23 +50,25 @@ function isCacheable(request) { return true; } -//self.addEventListener('fetch', function (event) { +if (self.location.toString().indexOf('localhost') == -1) { + self.addEventListener('fetch', function (event) { -// if (!isCacheable(event.request)) { -// return; -// } + if (!isCacheable(event.request)) { + return; + } -// event.respondWith( -// caches.open(staticFileCacheName).then(function (cache) { -// return cache.match(event.request).then(function (response) { -// return response || fetch(event.request).then(function (response) { -// cache.put(event.request, response.clone()); -// return response; -// }); -// }); -// }) -// ); -//}); + event.respondWith( + caches.open(staticFileCacheName).then(function (cache) { + return cache.match(event.request).then(function (response) { + return response || fetch(event.request).then(function (response) { + cache.put(event.request, response.clone()); + return response; + }); + }); + }) + ); + }); +} self.addEventListener('activate', function (event) { diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index f9783b1f69..d6bc6176ab 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -83,16 +83,12 @@ button.emby-button.raised.cancelDark { color: #fff; } -.ui-body-b button.emby-button.subdued:not([disabled]) { - color: #404040; -} - .ui-body-b button.emby-button.raised.subdued:not([disabled]) { background: #404040; color: #fff; } -.ui-body-b button.emby-button.raised[disabled].subduedd { +.ui-body-b button.emby-button.raised[disabled].subdued { background: #111; }