mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added new channel settings
This commit is contained in:
parent
8cf9cab99e
commit
18cd384168
7 changed files with 117 additions and 22 deletions
|
@ -100,22 +100,28 @@
|
|||
}
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
|
||||
var val = LocalSettings.val('enableBackdrops', userId);
|
||||
|
||||
return val != '0';
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', ".backdropPage", function () {
|
||||
$(document).on('pagebeforeshow', ".page", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if (enabled()) {
|
||||
var type = page.getAttribute('data-backdroptype');
|
||||
if ($(page).hasClass('backdropPage')) {
|
||||
|
||||
showBackdrop(type);
|
||||
if (enabled()) {
|
||||
var type = page.getAttribute('data-backdroptype');
|
||||
|
||||
showBackdrop(type);
|
||||
|
||||
} else {
|
||||
$(page).removeClass('backdropPage');
|
||||
clearBackdrop();
|
||||
}
|
||||
} else {
|
||||
$(page).removeClass('backdropPage');
|
||||
clearBackdrop();
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
coverImage: true
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(pagingHtml);
|
||||
html += pagingHtml;
|
||||
|
||||
$('#items', page).html(html).trigger('create').createPosterItemMenus();
|
||||
|
||||
|
|
47
dashboard-ui/scripts/channelsettings.js
Normal file
47
dashboard-ui/scripts/channelsettings.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
function loadPage(page, config) {
|
||||
|
||||
$('#selectChannelResolution', page).val(config.ChannelOptions.PreferredStreamingWidth || '')
|
||||
.selectmenu("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#channelSettingsPage", function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var form = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
// This should be null if empty
|
||||
config.ChannelOptions.PreferredStreamingWidth = $('#selectChannelResolution', form).val() || null;
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
|
||||
window.ChannelSettingsPage = {
|
||||
onSubmit: onSubmit
|
||||
};
|
||||
|
||||
})(jQuery, document, window);
|
|
@ -748,8 +748,12 @@ var Dashboard = {
|
|||
href: "autoorganizelog.html",
|
||||
selected: page.hasClass("organizePage")
|
||||
}, {
|
||||
name: "DLNA",
|
||||
name: "Channels",
|
||||
divider: true,
|
||||
href: "channelsettings.html",
|
||||
selected: page.hasClass("channelSettingsPage")
|
||||
}, {
|
||||
name: "DLNA",
|
||||
href: "dlnasettings.html",
|
||||
selected: page.hasClass("dlnaPage")
|
||||
}, {
|
||||
|
@ -780,7 +784,6 @@ var Dashboard = {
|
|||
selected: pageElem.id == "scheduledTasksPage" || pageElem.id == "scheduledTaskPage"
|
||||
}, {
|
||||
name: "Help",
|
||||
divider: true,
|
||||
href: "support.html",
|
||||
selected: pageElem.id == "supportPage" || pageElem.id == "logPage" || pageElem.id == "supporterPage" || pageElem.id == "supporterKeyPage" || pageElem.id == "aboutPage"
|
||||
}];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue