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
46
dashboard-ui/channelsettings.html
Normal file
46
dashboard-ui/channelsettings.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>${TitleChannels}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="channelSettingsPage" data-role="page" class="page type-interior channelSettingsPage">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
<br />
|
||||
<form class="channelSettingsForm">
|
||||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="selectChannelResolution">${LabelChannelStreamOptionBestAvailable}</label>
|
||||
<select id="selectChannelResolution">
|
||||
<option value="">${ChannelStreamOptionBestAvailable}</option>
|
||||
<option value="1920">1080p</option>
|
||||
<option value="1280">720p</option>
|
||||
<option value="720">480p</option>
|
||||
</select>
|
||||
<div class="fieldDescription">${LabelChannelStreamOptionBestAvailableHelp}</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check">
|
||||
${ButtonSave}
|
||||
</button>
|
||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete">
|
||||
${ButtonCancel}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('.channelSettingsForm').off('submit', ChannelSettingsPage.onSubmit).on('submit', ChannelSettingsPage.onSubmit);
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -196,28 +196,26 @@
|
|||
|
||||
.viewMenuTextLink {
|
||||
display: block;
|
||||
padding: .6em .5em .6em 43px!important;
|
||||
padding: .6em .5em .6em 39px!important;
|
||||
font-size: 15px;
|
||||
font-weight: 300!important;
|
||||
font-family: Roboto;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 18px 18px;
|
||||
background-position: 16px center;
|
||||
background-size: 14px 14px;
|
||||
background-position: 14px center;
|
||||
}
|
||||
|
||||
.musicViewMenu {
|
||||
background-image: url(images/items/folders/music.png);
|
||||
background-position: 16px 8px;
|
||||
background-position: 14px 8px;
|
||||
}
|
||||
|
||||
.homeViewMenu {
|
||||
background-image: url(images/items/folders/home.png);
|
||||
background-position: 16px 9px;
|
||||
}
|
||||
|
||||
.tvshowsViewMenu {
|
||||
background-image: url(images/items/folders/tv.png);
|
||||
background-position: 16px center;
|
||||
}
|
||||
|
||||
.moviesViewMenu, .trailersViewMenu {
|
||||
|
@ -226,12 +224,10 @@
|
|||
|
||||
.gamesViewMenu {
|
||||
background-image: url(images/items/folders/games.png);
|
||||
background-position: 16px 8px;
|
||||
}
|
||||
|
||||
.channelsViewMenu {
|
||||
background-image: url(images/items/folders/channels.png);
|
||||
background-position: 16px 9px;
|
||||
}
|
||||
|
||||
.booksViewMenu {
|
||||
|
@ -240,12 +236,10 @@
|
|||
|
||||
.musicvideosViewMenu {
|
||||
background-image: url(images/items/folders/musicvideos.png);
|
||||
background-position: 16px 8px;
|
||||
}
|
||||
|
||||
.photosViewMenu {
|
||||
background-image: url(images/items/folders/photos.png);
|
||||
background-position: 16px 8px;
|
||||
}
|
||||
|
||||
.homeVideosViewMenu {
|
||||
|
@ -258,7 +252,6 @@
|
|||
|
||||
.editorViewMenu {
|
||||
background-image: url(images/items/folders/edit.png);
|
||||
background-position: 16px 8px;
|
||||
}
|
||||
|
||||
.dashboardViewMenu {
|
||||
|
|
|
@ -291,7 +291,7 @@ h1 .imageLink {
|
|||
|
||||
.sidebarLinks a {
|
||||
display: block;
|
||||
padding: 12px 20px 12px 30px;
|
||||
padding: 10px 20px 10px 30px;
|
||||
text-decoration: none;
|
||||
color: #fff!important;
|
||||
text-shadow: none!important;
|
||||
|
@ -311,7 +311,7 @@ h1 .imageLink {
|
|||
|
||||
.sidebarDivider {
|
||||
height: 1px;
|
||||
background: #404040;
|
||||
background: #383838;
|
||||
margin: .25em 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,18 +106,24 @@
|
|||
return val != '0';
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', ".backdropPage", function () {
|
||||
$(document).on('pagebeforeshow', ".page", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if ($(page).hasClass('backdropPage')) {
|
||||
|
||||
if (enabled()) {
|
||||
var type = page.getAttribute('data-backdroptype');
|
||||
|
||||
showBackdrop(type);
|
||||
|
||||
} else {
|
||||
$(page).removeClass('backdropPage');
|
||||
clearBackdrop();
|
||||
}
|
||||
} else {
|
||||
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