mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
move channel view setting to global
This commit is contained in:
parent
5cd71abd36
commit
218112efc1
7 changed files with 43 additions and 18 deletions
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
.dockedtabs-tab-button {
|
.dockedtabs-tab-button {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: flex !important;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-transform: none !important;
|
text-transform: none !important;
|
||||||
|
@ -18,6 +17,14 @@
|
||||||
border-width: 0 !important;
|
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 {
|
.dockedtabs-tab-button, .dockedtabs-tab-button-foreground {
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
}
|
}
|
||||||
|
@ -41,4 +48,4 @@
|
||||||
.dockedtab-midsize {
|
.dockedtab-midsize {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 currentUser = {};
|
||||||
var currentUserViews = [];
|
var currentUserViews = [];
|
||||||
|
@ -47,7 +47,9 @@
|
||||||
|
|
||||||
function showMenu(menuItems, button) {
|
function showMenu(menuItems, button) {
|
||||||
|
|
||||||
require(['webActionSheet'], function (actionSheet) {
|
var actionSheetType = browser.safari ? 'actionsheet' : 'webActionSheet';
|
||||||
|
|
||||||
|
require([actionSheetType], function (actionSheet) {
|
||||||
|
|
||||||
actionSheet.show({
|
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) {
|
function render(options) {
|
||||||
|
|
||||||
var elem = document.createElement('div');
|
var elem = document.createElement('div');
|
||||||
|
@ -209,8 +225,11 @@
|
||||||
|
|
||||||
var buttons = elem.querySelectorAll('.emby-tab-button');
|
var buttons = elem.querySelectorAll('.emby-tab-button');
|
||||||
for (var i = 0, length = buttons.length; i < length; i++) {
|
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);
|
options.appFooter.add(elem);
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
config.EnableGroupingIntoCollections = form.querySelector('.chkGroupMoviesIntoCollections').checked;
|
config.EnableGroupingIntoCollections = form.querySelector('.chkGroupMoviesIntoCollections').checked;
|
||||||
config.DisplaySpecialsWithinSeasons = form.querySelector('.chkDisplaySpecialsWithinSeasons').checked;
|
config.DisplaySpecialsWithinSeasons = form.querySelector('.chkDisplaySpecialsWithinSeasons').checked;
|
||||||
config.DisplayCollectionsView = form.querySelector('.chkDisplayCollectionView').checked;
|
config.DisplayCollectionsView = form.querySelector('.chkDisplayCollectionView').checked;
|
||||||
|
config.EnableChannelView = !form.querySelector('.chkDisplayChannelsInline').checked;
|
||||||
|
|
||||||
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||||
});
|
});
|
||||||
|
@ -50,6 +51,7 @@
|
||||||
view.querySelector('.chkGroupMoviesIntoCollections').checked = config.EnableGroupingIntoCollections;
|
view.querySelector('.chkGroupMoviesIntoCollections').checked = config.EnableGroupingIntoCollections;
|
||||||
view.querySelector('.chkDisplaySpecialsWithinSeasons').checked = config.DisplaySpecialsWithinSeasons;
|
view.querySelector('.chkDisplaySpecialsWithinSeasons').checked = config.DisplaySpecialsWithinSeasons;
|
||||||
view.querySelector('.chkDisplayCollectionView').checked = config.DisplayCollectionsView;
|
view.querySelector('.chkDisplayCollectionView').checked = config.DisplayCollectionsView;
|
||||||
|
view.querySelector('.chkDisplayChannelsInline').checked = !(config.EnableChannelView || false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,14 @@
|
||||||
<div><a href="https://github.com/MediaBrowser/Wiki/wiki/Collections" target="_blank">${ButtonLearnMore}</a></div>
|
<div><a href="https://github.com/MediaBrowser/Wiki/wiki/Collections" target="_blank">${ButtonLearnMore}</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label>
|
||||||
|
<input class="chkDisplayChannelsInline" type="checkbox" is="emby-checkbox" />
|
||||||
|
<span>${OptionDisplayChannelsInline}</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription checkboxFieldDescription">${OptionDisplayChannelsInlineHelp}</div>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
||||||
|
|
||||||
|
|
|
@ -78,14 +78,6 @@
|
||||||
<div class="folderGroupList"></div>
|
<div class="folderGroupList"></div>
|
||||||
<div class="fieldDescription checkboxFieldDescription">${LabelSelectFolderGroupsHelp}</div>
|
<div class="fieldDescription checkboxFieldDescription">${LabelSelectFolderGroupsHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
|
||||||
<label>
|
|
||||||
<input class="chkDisplayChannelsInline" type="checkbox" is="emby-checkbox" />
|
|
||||||
<span>${OptionDisplayChannelsInline}</span>
|
|
||||||
</label>
|
|
||||||
<div class="fieldDescription checkboxFieldDescription">${OptionDisplayChannelsInlineHelp}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailSection">
|
<div class="detailSection">
|
||||||
|
|
|
@ -103,7 +103,6 @@
|
||||||
function loadForm(page, user, displayPreferences) {
|
function loadForm(page, user, displayPreferences) {
|
||||||
|
|
||||||
page.querySelector('.chkHidePlayedFromLatest').checked = user.Configuration.HidePlayedInLatest || false;
|
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('#selectHomeSection1').value = displayPreferences.CustomPrefs.home0 || '';
|
||||||
page.querySelector('#selectHomeSection2').value = displayPreferences.CustomPrefs.home1 || '';
|
page.querySelector('#selectHomeSection2').value = displayPreferences.CustomPrefs.home1 || '';
|
||||||
|
@ -154,8 +153,6 @@
|
||||||
|
|
||||||
user.Configuration.HidePlayedInLatest = page.querySelector('.chkHidePlayedFromLatest').checked;
|
user.Configuration.HidePlayedInLatest = page.querySelector('.chkHidePlayedFromLatest').checked;
|
||||||
|
|
||||||
user.Configuration.EnableChannelView = !page.querySelector('.chkDisplayChannelsInline').checked;
|
|
||||||
|
|
||||||
user.Configuration.LatestItemsExcludes = getCheckboxItems(".chkIncludeInLatest", page, false).map(function (i) {
|
user.Configuration.LatestItemsExcludes = getCheckboxItems(".chkIncludeInLatest", page, false).map(function (i) {
|
||||||
|
|
||||||
return i.getAttribute('data-folderid');
|
return i.getAttribute('data-folderid');
|
||||||
|
|
|
@ -920,8 +920,8 @@
|
||||||
"LabelKodiMetadataEnablePathSubstitution": "Enable path substitution",
|
"LabelKodiMetadataEnablePathSubstitution": "Enable path substitution",
|
||||||
"LabelKodiMetadataEnablePathSubstitutionHelp": "Enables path substitution of image paths using the server's path substitution settings.",
|
"LabelKodiMetadataEnablePathSubstitutionHelp": "Enables path substitution of image paths using the server's path substitution settings.",
|
||||||
"LabelKodiMetadataEnablePathSubstitutionHelp2": "See path substitution.",
|
"LabelKodiMetadataEnablePathSubstitutionHelp2": "See path substitution.",
|
||||||
"OptionDisplayChannelsInline": "Display channels inline within my views",
|
"OptionDisplayChannelsInline": "Display channels as media folders",
|
||||||
"OptionDisplayChannelsInlineHelp": "If enabled, channels will be displayed directly alongside other views. If disabled, they'll be displayed within a separate Channels view.",
|
"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",
|
"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'. ",
|
"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",
|
"LabelKodiMetadataEnableExtraThumbs": "Copy extrafanart into extrathumbs",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue