mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
clean up playback settings pages
This commit is contained in:
parent
8bec0ad63d
commit
6978a9d9df
@ -1,4 +1,4 @@
|
||||
define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize, dom) {
|
||||
define(["jQuery", "loading", "globalize", "dom", "libraryMenu"], function($, loading, globalize, dom, libraryMenu) {
|
||||
"use strict";
|
||||
|
||||
function loadPage(page, config, systemInfo) {
|
||||
@ -70,6 +70,19 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
|
||||
}), any ? context.querySelector(".decodingCodecsList").classList.remove("hide") : context.querySelector(".decodingCodecsList").classList.add("hide")
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "encodingsettings.html",
|
||||
name: Globalize.translate("Transcoding")
|
||||
}, {
|
||||
href: "playbackconfiguration.html",
|
||||
name: Globalize.translate("TabResumeSettings")
|
||||
}, {
|
||||
href: "streamingsettings.html",
|
||||
name: Globalize.translate("TabStreaming")
|
||||
}]
|
||||
}
|
||||
|
||||
$(document).on("pageinit", "#encodingSettingsPage", function() {
|
||||
var page = this;
|
||||
page.querySelector("#selectVideoDecoder").addEventListener("change", function() {
|
||||
@ -99,6 +112,7 @@ define(["jQuery", "loading", "globalize", "dom"], function($, loading, globalize
|
||||
}), $(".encodingSettingsForm").off("submit", onSubmit).on("submit", onSubmit)
|
||||
}).on("pageshow", "#encodingSettingsPage", function() {
|
||||
loading.show();
|
||||
libraryMenu.setTabs("playback", 0, getTabs);
|
||||
var page = this;
|
||||
ApiClient.getNamedConfiguration("encoding").then(function(config) {
|
||||
ApiClient.getSystemInfo().then(function(systemInfo) {
|
||||
|
@ -15,6 +15,9 @@ define(["jQuery", "loading", "libraryMenu"], function($, loading, libraryMenu) {
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "encodingsettings.html",
|
||||
name: Globalize.translate("Transcoding")
|
||||
}, {
|
||||
href: "playbackconfiguration.html",
|
||||
name: Globalize.translate("TabResumeSettings")
|
||||
}, {
|
||||
@ -22,10 +25,12 @@ define(["jQuery", "loading", "libraryMenu"], function($, loading, libraryMenu) {
|
||||
name: Globalize.translate("TabStreaming")
|
||||
}]
|
||||
}
|
||||
|
||||
$(document).on("pageinit", "#playbackConfigurationPage", function() {
|
||||
$(".playbackConfigurationForm").off("submit", onSubmit).on("submit", onSubmit)
|
||||
}).on("pageshow", "#playbackConfigurationPage", function() {
|
||||
libraryMenu.setTabs("playback", 0, getTabs), loading.show();
|
||||
loading.show();
|
||||
libraryMenu.setTabs("playback", 1, getTabs);
|
||||
var page = this;
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
loadPage(page, config)
|
||||
|
@ -15,6 +15,9 @@ define(["jQuery", "libraryMenu", "loading"], function($, libraryMenu, loading) {
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "encodingsettings.html",
|
||||
name: Globalize.translate("Transcoding")
|
||||
}, {
|
||||
href: "playbackconfiguration.html",
|
||||
name: Globalize.translate("TabResumeSettings")
|
||||
}, {
|
||||
@ -22,6 +25,7 @@ define(["jQuery", "libraryMenu", "loading"], function($, libraryMenu, loading) {
|
||||
name: Globalize.translate("TabStreaming")
|
||||
}]
|
||||
}
|
||||
|
||||
$(document).on("pageinit", "#streamingSettingsPage", function() {
|
||||
var page = this;
|
||||
$("#btnSelectTranscodingTempPath", page).on("click.selectDirectory", function() {
|
||||
@ -38,7 +42,8 @@ define(["jQuery", "libraryMenu", "loading"], function($, libraryMenu, loading) {
|
||||
})
|
||||
}), $(".streamingSettingsForm").off("submit", onSubmit).on("submit", onSubmit)
|
||||
}).on("pageshow", "#streamingSettingsPage", function() {
|
||||
loading.show(), libraryMenu.setTabs("playback", 1, getTabs);
|
||||
loading.show();
|
||||
libraryMenu.setTabs("playback", 2, getTabs);
|
||||
var page = this;
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
loadPage(page, config)
|
||||
|
@ -1,10 +1,7 @@
|
||||
<div id="encodingSettingsPage" data-role="page" class="page type-interior playbackConfigurationPage">
|
||||
|
||||
<div id="encodingSettingsPage" data-role="page" class="page type-interior playbackConfigurationPage withTabs">
|
||||
<div>
|
||||
<div class="content-primary">
|
||||
|
||||
<form class="encodingSettingsForm">
|
||||
|
||||
<div class="verticalSection">
|
||||
<div class="sectionTitleContainer flex align-items-center">
|
||||
<h2 class="sectionTitle">${TabTranscoding}</h2>
|
||||
@ -150,4 +147,4 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,9 +1,10 @@
|
||||
<div id="playbackConfigurationPage" data-role="page" class="page type-interior playbackConfigurationPage withTabs">
|
||||
|
||||
<div>
|
||||
<div class="content-primary">
|
||||
|
||||
<form class="playbackConfigurationForm">
|
||||
<div class="sectionTitleContainer flex align-items-center">
|
||||
<h2 class="sectionTitle">${TabResumeSettings}</h2>
|
||||
</div>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="number" id="txtMinResumePct" name="txtMinResumePct" pattern="[0-9]*" required min="0" max="100" label="${LabelMinResumePercentage}"></input>
|
||||
<div class="fieldDescription">
|
||||
@ -22,9 +23,6 @@
|
||||
${LabelMinResumeDurationHelp}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div><button is="emby-button" type="submit" class="raised button-submit block"><span>${ButtonSave}</span></button></div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -288,13 +288,8 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
}, {
|
||||
name: globalize.translate("TabPlayback"),
|
||||
icon: "play_arrow",
|
||||
href: "playbackconfiguration.html",
|
||||
pageIds: ["playbackConfigurationPage", "streamingSettingsPage"]
|
||||
}, {
|
||||
name: globalize.translate("TabTranscoding"),
|
||||
icon: "swap_horiz",
|
||||
href: "encodingsettings.html",
|
||||
pageIds: ["encodingSettingsPage"]
|
||||
pageIds: ["encodingSettingsPage", "playbackConfigurationPage", "streamingSettingsPage"]
|
||||
}];
|
||||
addPluginPagesToMainMenu(links, pluginItems, "server");
|
||||
links.push({
|
||||
|
@ -1,22 +1,16 @@
|
||||
<div id="streamingSettingsPage" data-role="page" class="page type-interior playbackConfigurationPage withTabs">
|
||||
|
||||
<div>
|
||||
<div class="content-primary">
|
||||
|
||||
<form class="streamingSettingsForm">
|
||||
|
||||
<div class="verticalSection">
|
||||
<div class="sectionTitleContainer flex align-items-center">
|
||||
<h2 class="sectionTitle">${TabStreaming}</h2>
|
||||
<a is="emby-linkbutton" class="raised button-alt headerHelpButton" target="_blank" href="https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Streaming">${Help}</a>
|
||||
</div>
|
||||
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="number" id="txtRemoteClientBitrateLimit" pattern="[0-9]*" min="0" step=".25" label="${LabelRemoteClientBitrateLimit}" />
|
||||
<div class="fieldDescription">${LabelRemoteClientBitrateLimitHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button is="emby-button" type="submit" class="raised button-submit block"><span>${ButtonSave}</span></button>
|
||||
</form>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user