diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 1cb4b1d3a7..618053db21 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.269", - "_release": "1.4.269", + "version": "1.4.272", + "_release": "1.4.272", "_resolution": { "type": "version", - "tag": "1.4.269", - "commit": "41662a2afb91d76f80d64f9af4aae12144047e75" + "tag": "1.4.272", + "commit": "7976226b263bc95a1daa565d7fb47c316e7c2cad" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.1", diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.js b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.js new file mode 100644 index 0000000000..c704139925 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.js @@ -0,0 +1,101 @@ +define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectionManager', 'require', 'loading', 'scrollHelper', 'emby-checkbox', 'css!./../formdialog', 'material-icons'], function (dialogHelper, globalize, userSettings, layoutManager, connectionManager, require, loading, scrollHelper) { + + function save(context, options) { + + var categories = []; + + var chkCategorys = context.querySelectorAll('.chkCategory'); + for (var i = 0, length = chkCategorys.length; i < length; i++) { + + var type = chkCategorys[i].getAttribute('data-type'); + + if (chkCategorys[i].checked) { + categories.push(type); + } + } + + // differentiate between none and all + categories.push('all'); + options.categories = categories; + } + + function load(context, options) { + + var selectedCategories = options.categories || []; + + var chkCategorys = context.querySelectorAll('.chkCategory'); + for (var i = 0, length = chkCategorys.length; i < length; i++) { + + var type = chkCategorys[i].getAttribute('data-type'); + + chkCategorys[i].checked = !selectedCategories.length || selectedCategories.indexOf(type) != -1; + } + } + + function showEditor(options) { + + return new Promise(function (resolve, reject) { + + var settingsChanged = false; + + require(['text!./guide-categories.template.html'], function (template) { + + var dialogOptions = { + removeOnClose: true, + scrollY: false + }; + + if (layoutManager.tv) { + dialogOptions.size = 'fullscreen'; + } else { + dialogOptions.size = 'small'; + } + + var dlg = dialogHelper.createDialog(dialogOptions); + + dlg.classList.add('formDialog'); + + var html = ''; + + html += globalize.translateDocument(template, 'sharedcomponents'); + + dlg.innerHTML = html; + + dlg.addEventListener('change', function () { + + settingsChanged = true; + }); + + dlg.addEventListener('close', function () { + + if (layoutManager.tv) { + scrollHelper.centerFocus.off(dlg.querySelector('.formDialogContent'), false); + } + + save(dlg, options); + + if (settingsChanged) { + resolve(options); + } else { + reject(); + } + }); + + dlg.querySelector('.btnCancel').addEventListener('click', function () { + dialogHelper.close(dlg); + }); + + if (layoutManager.tv) { + scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false); + } + + load(dlg, options); + dialogHelper.open(dlg); + }); + }); + } + + return { + show: showEditor + }; +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.template.html b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.template.html new file mode 100644 index 0000000000..8b2d64a0d8 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.template.html @@ -0,0 +1,33 @@ +
+ +

+ ${Categories} +

+
+
+
+ +
+ + + + + +
+
+
\ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js index dedb11041d..8782588556 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js @@ -7,8 +7,9 @@ var type = chkIndicators[i].getAttribute('data-type'); userSettings.set('guide-indicator-' + type, chkIndicators[i].checked); - } + + userSettings.set('guide-colorcodedbackgrounds', context.querySelector('.chkColorCodedBackgrounds').checked); } function load(context) { @@ -24,6 +25,8 @@ chkIndicators[i].checked = userSettings.get('guide-indicator-' + type) == 'true'; } } + + context.querySelector('.chkColorCodedBackgrounds').checked = userSettings.get('guide-colorcodedbackgrounds') == 'true'; } function showEditor() { diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html index 4b8c663eaf..f2d7693507 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html @@ -10,25 +10,30 @@

${ShowIndicatorsFor}

+
+ \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css index 325ae50360..ae3897dfa1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css @@ -9,6 +9,7 @@ width: 100%; flex-shrink: 0; display: flex; + padding-left: 3.4em; } .tvProgramSectionHeader { @@ -22,34 +23,10 @@ position: relative; } -.tvProgramTimeSlotInner { - padding: .5em; -} - -.tvProgramInfo { - vertical-align: middle; - padding: .5em .5em; - border-bottom: .65vh solid #121212; -} - -.tvProgramCurrentTimeSlot { - background-color: green; -} - -.tvProgramName { - color: #fff; - margin-bottom: .5em; -} - -.tvProgramTime { - color: #fff; -} - .guideProgramIndicator { text-transform: uppercase; border-radius: 2px; margin-right: .5em; - color: #fff; font-size: 74%; padding: .2em .25em; display: inline-flex; @@ -59,30 +36,6 @@ color: #fff; } -.programAccent { - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 2px; -} - -.sportsAccent { - background-color: #0A7C33; -} - -.newsAccent { - background-color: #523378; -} - -.movieAccent { - background-color: #A43913; -} - -.childAccent { - background-color: #0B487D; -} - .channelTimeslotHeader { flex-shrink: 0; } @@ -184,7 +137,6 @@ background: rgba(40, 40, 40, .9); display: flex; align-items: center; - color: #fff !important; text-decoration: none; /* Needed in firefox */ text-align: left; @@ -329,7 +281,6 @@ border-left: .65vh solid #121212 !important; background-color: rgba(32, 32, 32, .95); display: flex; - color: #fff !important; text-decoration: none; overflow: hidden; align-items: center; @@ -338,15 +289,32 @@ contain: strict; } -.timeslotCellInner { +.programAccent { position: absolute; bottom: 0; - overflow: hidden; - width: 100%; - top: 0; - display: block; - text-decoration: none; - color: #fff !important; + left: 0; + right: 0; + height: 2px; +} + +.sportsAccent { + background-color: #3F51B5; +} + +.movieAccent { + background-color: #673AB7; +} + +.childAccent { + background-color: #2196F3; +} + +.newsAccent { + background-color: #4CAF50; +} + +.specialsAccent { + background-color: #FF9800; } .guideProgramName { @@ -357,11 +325,6 @@ align-items: center; } -.guideProgramTime { - padding: 0 .5em .35em; - color: #bbb; -} - .programIcon { margin-left: auto; margin-right: .25em; @@ -405,6 +368,33 @@ } } +.channelsContainer { + display: flex; +} + +.btnCategories { + margin: 0 .3em !important; + padding: 0 !important; + flex-shrink: 0; + background: rgba(40, 40, 40, .9); + border-radius: 0 !important; + width: 2.8em; + font-weight: normal !important; + align-items: flex-start; +} + +.btnCategoriesText { + transform: rotate(90deg); + text-transform: uppercase; + transform-origin: left; + margin-left: 1.2em; + letter-spacing: .25em; + /*position: fixed; + top: 20%;*/ + white-space: nowrap; + margin-top: -10em; +} + .channelList { display: flex; flex-direction: column; @@ -456,3 +446,14 @@ display: flex; align-items: center; } + +@media all and (max-width: 800px), all and (max-height: 600px) { + + .tvGuideHeader { + padding-left: 0; + } + + .btnCategories { + display: none; + } +} diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js index cdc6ebdbc7..1c1023357c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.js @@ -9,12 +9,24 @@ }); } + function showCategoryOptions(instance) { + + require(['guide-categories-dialog'], function (guideCategoriesDialog) { + guideCategoriesDialog.show(instance.categoryOptions).then(function (categoryOptions) { + + instance.categoryOptions = categoryOptions; + instance.refresh(); + }); + }); + } + function Guide(options) { var self = this; var items = {}; self.options = options; + self.categoryOptions = { categories: [] }; // 30 mins var cellCurationMinutes = 30; @@ -316,6 +328,14 @@ var clickAction = layoutManager.tv ? 'link' : 'programdialog'; + var categories = self.categoryOptions.categories || []; + var displayMovieContent = !categories.length || categories.indexOf('movies') != -1; + var displaySportsContent = !categories.length || categories.indexOf('sports') != -1; + var displayOtherContent = !categories.length || categories.indexOf('others') != -1; + var displayNewsContent = !categories.length || categories.indexOf('news') != -1; + var displayKidsContent = !categories.length || categories.indexOf('kids') != -1; + var enableColorCodedBackgrounds = userSettings.get('guide-colorcodedbackgrounds') == 'true'; + for (var i = 0, length = programs.length; i < length; i++) { var program = programs[i]; @@ -346,20 +366,35 @@ endPercent *= 100; var cssClass = "programCell clearButton itemAction"; - var addAccent = true; + var accentCssClass; + var displayInnerContent = true; if (program.IsKids) { cssClass += " childProgramInfo"; + displayInnerContent = displayKidsContent; + accentCssClass = 'childAccent'; } else if (program.IsSports) { cssClass += " sportsProgramInfo"; + displayInnerContent = displaySportsContent; + accentCssClass = 'sportsAccent'; } else if (program.IsNews) { cssClass += " newsProgramInfo"; + displayInnerContent = displayNewsContent; + accentCssClass = 'newsAccent'; } else if (program.IsMovie) { cssClass += " movieProgramInfo"; + displayInnerContent = displayMovieContent; + accentCssClass = 'movieAccent'; } else { cssClass += " plainProgramInfo"; - addAccent = false; + displayInnerContent = displayOtherContent; + } + + if (enableColorCodedBackgrounds && accentCssClass) { + cssClass += ' ' + accentCssClass; + + accentCssClass = null; } var timerAttributes = ''; @@ -369,53 +404,47 @@ if (program.SeriesTimerId) { timerAttributes += ' data-seriestimerid="' + program.SeriesTimerId + '"'; } + html += ' +
-
+
+
+
+ +
+
diff --git a/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js b/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js index 2fb22e7851..d3df3261e8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js +++ b/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js @@ -834,7 +834,7 @@ define(['browser', 'layoutManager', 'dom', 'focusManager', 'scrollStyles'], func function onFrameClick(e) { if (e.which == 1) { var focusableParent = focusManager.focusableParent(e.target); - if (focusableParent != document.activeElement) { + if (focusableParent && focusableParent != document.activeElement) { focusableParent.focus(); } } 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 5b4536a3c8..a6cb418042 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json @@ -307,5 +307,12 @@ "DefaultErrorMessage": "There was an error processing the request. Please try again later.", "LabelKeep:": "Keep:", "UntilIDelete": "Until I delete", - "UntilSpaceNeeded": "Until space needed" + "UntilSpaceNeeded": "Until space needed", + "Categories": "Categories", + "Sports": "Sports", + "News": "News", + "Movies": "Movies", + "Kids": "Kids", + "Others": "Others", + "EnableColorCodedBackgrounds": "Enable color coded backgrounds" } \ No newline at end of file diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 1da12bc808..5087da3e17 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -19,7 +19,6 @@ /* If this is raised, make sure it does not overlap bottom footer */ z-index: 1; margin: 0 !important; - width: 100% !important; /* Page needs to supply padding */ top: 102px !important; transition: transform 200ms ease-out; diff --git a/dashboard-ui/css/livetv.css b/dashboard-ui/css/livetv.css index 1386cf7a41..56f8d61187 100644 --- a/dashboard-ui/css/livetv.css +++ b/dashboard-ui/css/livetv.css @@ -1,8 +1,4 @@ -.guideTabContent { - background: #121212; -} - -/* Allow vertical space for anything that slides up at the bottom */ +/* Allow vertical space for anything that slides up at the bottom */ .guideVerticalScroller { padding-bottom: 160px; } diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index cc2f5afc0f..e64eb61a9b 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -986,7 +986,7 @@ if (browser.msie) { - if (window.MediaSource == null || mediaSource.RunTimeTicks == null) { + if (window.MediaSource == null || mediaSource.RunTimeTicks == null || browser.mobile) { alert('Playback of this content is not supported in Internet Explorer. For a better experience, please try a modern browser such as Google Chrome, Firefox, Opera, or Microsoft Edge.'); return; } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 40873be0c1..a2ca56d7d1 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1263,6 +1263,7 @@ var AppInfo = {}; define("tvguide", [embyWebComponentsBowerPath + "/guide/guide"], returnFirstDependency); define("programStyles", ['css!' + embyWebComponentsBowerPath + "/guide/programs"], returnFirstDependency); define("guide-settings-dialog", [embyWebComponentsBowerPath + "/guide/guide-settings"], returnFirstDependency); + define("guide-categories-dialog", [embyWebComponentsBowerPath + "/guide/guide-categories"], returnFirstDependency); define("syncDialog", [embyWebComponentsBowerPath + "/sync/sync"], returnFirstDependency); define("voiceDialog", [embyWebComponentsBowerPath + "/voice/voicedialog"], returnFirstDependency); define("voiceReceiver", [embyWebComponentsBowerPath + "/voice/voicereceiver"], returnFirstDependency);