mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
commit
8242a6277f
@ -319,13 +319,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||
pageIds: ["devicesPage", "devicePage"],
|
||||
icon: "tablet"
|
||||
});
|
||||
links.push({
|
||||
name: globalize.translate("HeaderDownloadSync"),
|
||||
icon: "file_download",
|
||||
href: "syncactivity.html",
|
||||
pageIds: ["syncActivityPage", "syncJobPage", "syncSettingsPage"],
|
||||
color: "#009688"
|
||||
});
|
||||
links.push({
|
||||
name: globalize.translate("TabCameraUpload"),
|
||||
href: "devicesupload.html",
|
||||
|
@ -754,15 +754,6 @@ var Dashboard = {
|
||||
dependencies: [],
|
||||
autoFocus: !1,
|
||||
roles: "admin"
|
||||
}), defineRoute({
|
||||
path: "/syncactivity.html",
|
||||
dependencies: [],
|
||||
autoFocus: !1,
|
||||
controller: "scripts/syncactivity"
|
||||
}), defineRoute({
|
||||
path: "/syncsettings.html",
|
||||
dependencies: [],
|
||||
autoFocus: !1
|
||||
}), defineRoute({
|
||||
path: "/tv.html",
|
||||
dependencies: ["paper-icon-button-light", "emby-button"],
|
||||
|
@ -1,41 +0,0 @@
|
||||
define(["loading", "libraryMenu", "apphost", "globalize", "syncJobList", "events", "scripts/taskbutton", "localsync", "emby-button", "paper-icon-button-light"], function(loading, libraryMenu, appHost, globalize, syncJobList, events, taskButton) {
|
||||
"use strict";
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "syncactivity.html",
|
||||
name: Globalize.translate("TabSyncJobs")
|
||||
}, {
|
||||
href: "appservices.html?context=sync",
|
||||
name: Globalize.translate("TabServices")
|
||||
}, {
|
||||
href: "syncsettings.html",
|
||||
name: Globalize.translate("TabSettings")
|
||||
}]
|
||||
}
|
||||
return function(view, params) {
|
||||
var mySyncJobList = new syncJobList({
|
||||
mode: params.mode,
|
||||
serverId: ApiClient.serverId(),
|
||||
userId: "offline" === params.mode ? null : ApiClient.getCurrentUserId(),
|
||||
element: view.querySelector(".syncActivity"),
|
||||
mode: params.mode
|
||||
});
|
||||
view.addEventListener("viewshow", function() {
|
||||
libraryMenu.setTabs("syncadmin", 0, getTabs), taskButton({
|
||||
mode: "on",
|
||||
progressElem: view.querySelector(".syncProgress"),
|
||||
taskKey: "SyncPrepare",
|
||||
button: view.querySelector(".btnSync")
|
||||
})
|
||||
}), view.addEventListener("viewbeforehide", function() {
|
||||
taskButton({
|
||||
mode: "off",
|
||||
taskKey: "SyncPrepare",
|
||||
button: view.querySelector(".btnSync")
|
||||
})
|
||||
}), view.addEventListener("viewdestroy", function() {
|
||||
mySyncJobList.destroy()
|
||||
})
|
||||
}
|
||||
});
|
@ -1,48 +0,0 @@
|
||||
define(["jQuery", "loading", "libraryMenu", "fnchecked", "emby-select"], function($, loading, libraryMenu) {
|
||||
"use strict";
|
||||
|
||||
function loadPage(page, config) {
|
||||
$("#txtSyncTempPath", page).val(config.TemporaryPath || ""), $("#txtUploadSpeedLimit", page).val(config.UploadSpeedLimitBytes / 1e6 || ""), $("#selectThreadCount", page).val(config.TranscodingCpuCoreLimit), $("#chkEnableFullSpeedConversion", page).checked(config.EnableFullSpeedTranscoding), loading.hide()
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
loading.show();
|
||||
var form = this;
|
||||
return ApiClient.getNamedConfiguration("sync").then(function(config) {
|
||||
config.TemporaryPath = $("#txtSyncTempPath", form).val(), config.UploadSpeedLimitBytes = parseInt(1e6 * parseFloat($("#txtUploadSpeedLimit", form).val() || "0")), config.TranscodingCpuCoreLimit = parseInt($("#selectThreadCount", form).val()), config.EnableFullSpeedTranscoding = $("#chkEnableFullSpeedConversion", form).checked(), ApiClient.updateNamedConfiguration("sync", config).then(Dashboard.processServerConfigurationUpdateResult)
|
||||
}), !1
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "syncactivity.html",
|
||||
name: Globalize.translate("TabSyncJobs")
|
||||
}, {
|
||||
href: "appservices.html?context=sync",
|
||||
name: Globalize.translate("TabServices")
|
||||
}, {
|
||||
href: "syncsettings.html",
|
||||
name: Globalize.translate("TabSettings")
|
||||
}]
|
||||
}
|
||||
$(document).on("pageinit", "#syncSettingsPage", function() {
|
||||
var page = this;
|
||||
$("#btnSelectSyncTempPath", page).on("click.selectDirectory", function() {
|
||||
require(["directorybrowser"], function(directoryBrowser) {
|
||||
var picker = new directoryBrowser;
|
||||
picker.show({
|
||||
callback: function(path) {
|
||||
path && $("#txtSyncTempPath", page).val(path), picker.close()
|
||||
},
|
||||
validateWriteable: !0
|
||||
})
|
||||
})
|
||||
}), $(".syncSettingsForm").off("submit", onSubmit).on("submit", onSubmit)
|
||||
}).on("pageshow", "#syncSettingsPage", function() {
|
||||
loading.show(), libraryMenu.setTabs("syncadmin", 2, getTabs);
|
||||
var page = this;
|
||||
ApiClient.getNamedConfiguration("sync").then(function(config) {
|
||||
loadPage(page, config)
|
||||
})
|
||||
})
|
||||
});
|
@ -1,56 +0,0 @@
|
||||
<div id="syncSettingsPage" data-role="page" class="page type-interior withTabs" data-helpurl="https://web.archive.org/web/20181216120305/https://github.com/MediaBrowser/Wiki/wiki/Sync" data-require="scripts/syncsettings,emby-checkbox,emby-input,emby-button,paper-icon-button-light,material-icons">
|
||||
|
||||
<div>
|
||||
<div class="content-primary">
|
||||
|
||||
<form class="syncSettingsForm">
|
||||
|
||||
<div class="inputContainer">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="flex-grow:1;">
|
||||
<input is="emby-input" type="text" id="txtSyncTempPath" label="${LabelSyncTempPath}" />
|
||||
</div>
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectSyncTempPath" title="${ButtonSelectDirectory}" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
<div class="fieldDescription">${LabelSyncTempPathHelp}</div>
|
||||
</div>
|
||||
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="number" min="0" step=".5" id="txtUploadSpeedLimit" label="${LabelUploadSpeedLimit}" />
|
||||
</div>
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" id="selectThreadCount" label="${LabelTranscodingThreadCount}">
|
||||
<option value="-1">${OptionAuto}</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="0">${OptionMax}</option>
|
||||
</select>
|
||||
<div class="fieldDescription">${LabelTranscodingThreadCountHelp}</div>
|
||||
</div>
|
||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" id="chkEnableFullSpeedConversion" />
|
||||
<span>${OptionEnableFullSpeedConversion}</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">${OptionEnableFullSpeedConversionHelp}</div>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<button is="emby-button" type="submit" class="raised button-submit block">
|
||||
<span>${ButtonSave}</span>
|
||||
</button>
|
||||
|
||||
<button is="emby-button" type="button" class="raised button-cancel block btnCancel" onclick="history.back();">
|
||||
<span>${ButtonCancel}</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user