diff --git a/src/scripts/librarymenu.js b/src/scripts/librarymenu.js index b0cd078b7a..d649121f9f 100644 --- a/src/scripts/librarymenu.js +++ b/src/scripts/librarymenu.js @@ -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", diff --git a/src/scripts/site.js b/src/scripts/site.js index 91c6edeed5..3c67c7dfc4 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -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"], diff --git a/src/scripts/syncactivity.js b/src/scripts/syncactivity.js deleted file mode 100644 index f6bfcb124d..0000000000 --- a/src/scripts/syncactivity.js +++ /dev/null @@ -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() - }) - } -}); \ No newline at end of file diff --git a/src/scripts/syncsettings.js b/src/scripts/syncsettings.js deleted file mode 100644 index 0fa73d9d90..0000000000 --- a/src/scripts/syncsettings.js +++ /dev/null @@ -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) - }) - }) -}); \ No newline at end of file diff --git a/src/syncsettings.html b/src/syncsettings.html deleted file mode 100644 index 08e9864513..0000000000 --- a/src/syncsettings.html +++ /dev/null @@ -1,56 +0,0 @@ -
- -
-
- -
- -
-
-
- -
- -
-
${LabelSyncTempPathHelp}
-
- -
- -
-
- -
${LabelTranscodingThreadCountHelp}
-
-
- -
${OptionEnableFullSpeedConversionHelp}
-
-
-
- - - -
-
-
-
-
\ No newline at end of file