diff --git a/dashboard-ui/components/dockedtabs/dockedtabs.css b/dashboard-ui/components/dockedtabs/dockedtabs.css index 6999a99c1e..97102427f9 100644 --- a/dashboard-ui/components/dockedtabs/dockedtabs.css +++ b/dashboard-ui/components/dockedtabs/dockedtabs.css @@ -6,7 +6,6 @@ .dockedtabs-tab-button { flex-grow: 1; - display: flex !important; align-items: center; justify-content: center; text-transform: none !important; @@ -18,6 +17,14 @@ border-width: 0 !important; } + .dockedtabs-tab-button:not(.hide) { + display: flex !important; + } + +.dockedtabs-tab-button-noflex:not(.hide) { + display: block !important; +} + .dockedtabs-tab-button, .dockedtabs-tab-button-foreground { font-weight: normal !important; } @@ -41,4 +48,4 @@ .dockedtab-midsize { display: none !important; } -} \ No newline at end of file +} diff --git a/dashboard-ui/components/dockedtabs/dockedtabs.js b/dashboard-ui/components/dockedtabs/dockedtabs.js index 995004a8db..16d32beac8 100644 --- a/dashboard-ui/components/dockedtabs/dockedtabs.js +++ b/dashboard-ui/components/dockedtabs/dockedtabs.js @@ -1,4 +1,4 @@ -define(['apphost', 'connectionManager', 'events', 'globalize', 'css!./dockedtabs', 'emby-tabs'], function (appHost, connectionManager, events, globalize) { +define(['apphost', 'connectionManager', 'events', 'globalize', 'browser', 'css!./dockedtabs', 'emby-tabs'], function (appHost, connectionManager, events, globalize, browser) { var currentUser = {}; var currentUserViews = []; @@ -47,7 +47,9 @@ function showMenu(menuItems, button) { - require(['webActionSheet'], function (actionSheet) { + var actionSheetType = browser.safari ? 'actionsheet' : 'webActionSheet'; + + require([actionSheetType], function (actionSheet) { actionSheet.show({ @@ -159,6 +161,20 @@ } } + function addNoFlexClass(buttons) { + + setTimeout(function() { + for (var i = 0, length = buttons.length; i < length; i++) { + + var button = buttons[i]; + + if (button.classList.contains('emby-button-noflex')) { + button.classList.add('dockedtabs-tab-button-noflex'); + } + } + }, 300); + } + function render(options) { var elem = document.createElement('div'); @@ -209,8 +225,11 @@ var buttons = elem.querySelectorAll('.emby-tab-button'); for (var i = 0, length = buttons.length; i < length; i++) { - buttons[i].addEventListener('click', onTabClick); + + var button = buttons[i]; + button.addEventListener('click', onTabClick); } + addNoFlexClass(buttons); options.appFooter.add(elem); diff --git a/dashboard-ui/dashboard/librarydisplay.js b/dashboard-ui/dashboard/librarydisplay.js index 29b2fe1d7c..131d4f7df7 100644 --- a/dashboard-ui/dashboard/librarydisplay.js +++ b/dashboard-ui/dashboard/librarydisplay.js @@ -36,6 +36,7 @@ config.EnableGroupingIntoCollections = form.querySelector('.chkGroupMoviesIntoCollections').checked; config.DisplaySpecialsWithinSeasons = form.querySelector('.chkDisplaySpecialsWithinSeasons').checked; config.DisplayCollectionsView = form.querySelector('.chkDisplayCollectionView').checked; + config.EnableChannelView = !form.querySelector('.chkDisplayChannelsInline').checked; ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult); }); @@ -50,6 +51,7 @@ view.querySelector('.chkGroupMoviesIntoCollections').checked = config.EnableGroupingIntoCollections; view.querySelector('.chkDisplaySpecialsWithinSeasons').checked = config.DisplaySpecialsWithinSeasons; view.querySelector('.chkDisplayCollectionView').checked = config.DisplayCollectionsView; + view.querySelector('.chkDisplayChannelsInline').checked = !(config.EnableChannelView || false); }); } diff --git a/dashboard-ui/librarydisplay.html b/dashboard-ui/librarydisplay.html index 72676b3e73..23979d5f9d 100644 --- a/dashboard-ui/librarydisplay.html +++ b/dashboard-ui/librarydisplay.html @@ -33,6 +33,14 @@
${ButtonLearnMore}
+ +
+ +
${OptionDisplayChannelsInlineHelp}
+

diff --git a/dashboard-ui/mypreferenceshome.html b/dashboard-ui/mypreferenceshome.html index 58c0a6820c..69a87dd438 100644 --- a/dashboard-ui/mypreferenceshome.html +++ b/dashboard-ui/mypreferenceshome.html @@ -78,14 +78,6 @@
${LabelSelectFolderGroupsHelp}
-
-
- -
${OptionDisplayChannelsInlineHelp}
-
diff --git a/dashboard-ui/scripts/mypreferenceshome.js b/dashboard-ui/scripts/mypreferenceshome.js index 83afba919d..0e3caf9aa2 100644 --- a/dashboard-ui/scripts/mypreferenceshome.js +++ b/dashboard-ui/scripts/mypreferenceshome.js @@ -103,7 +103,6 @@ function loadForm(page, user, displayPreferences) { page.querySelector('.chkHidePlayedFromLatest').checked = user.Configuration.HidePlayedInLatest || false; - page.querySelector('.chkDisplayChannelsInline').checked = !(user.Configuration.EnableChannelView || false); page.querySelector('#selectHomeSection1').value = displayPreferences.CustomPrefs.home0 || ''; page.querySelector('#selectHomeSection2').value = displayPreferences.CustomPrefs.home1 || ''; @@ -154,8 +153,6 @@ user.Configuration.HidePlayedInLatest = page.querySelector('.chkHidePlayedFromLatest').checked; - user.Configuration.EnableChannelView = !page.querySelector('.chkDisplayChannelsInline').checked; - user.Configuration.LatestItemsExcludes = getCheckboxItems(".chkIncludeInLatest", page, false).map(function (i) { return i.getAttribute('data-folderid'); diff --git a/dashboard-ui/strings/en-US.json b/dashboard-ui/strings/en-US.json index 01a7b650cd..33a7960adb 100644 --- a/dashboard-ui/strings/en-US.json +++ b/dashboard-ui/strings/en-US.json @@ -920,8 +920,8 @@ "LabelKodiMetadataEnablePathSubstitution": "Enable path substitution", "LabelKodiMetadataEnablePathSubstitutionHelp": "Enables path substitution of image paths using the server's path substitution settings.", "LabelKodiMetadataEnablePathSubstitutionHelp2": "See path substitution.", - "OptionDisplayChannelsInline": "Display channels inline within my views", - "OptionDisplayChannelsInlineHelp": "If enabled, channels will be displayed directly alongside other views. If disabled, they'll be displayed within a separate Channels view.", + "OptionDisplayChannelsInline": "Display channels as media folders", + "OptionDisplayChannelsInlineHelp": "If enabled, channels will be displayed directly alongside other media libraries. If disabled, they'll be displayed within a separate Channels folder.", "LabelDisplayCollectionsView": "Display a collections view to show movie collections", "LabelDisplayCollectionsViewHelp": "This will create a separate view to display movie collections. To create a collection, right-click or tap-hold any movie and select 'Add to Collection'. ", "LabelKodiMetadataEnableExtraThumbs": "Copy extrafanart into extrathumbs",