diff --git a/src/camerauploadsettings.html b/src/camerauploadsettings.html deleted file mode 100644 index 46de0f1a06..0000000000 --- a/src/camerauploadsettings.html +++ /dev/null @@ -1,17 +0,0 @@ -
- -
-
- -

- ${HeaderCameraUpload} -

- -
-

${SelectCameraUploadServers}

- -
-
-
-
-
\ No newline at end of file diff --git a/src/mypreferencesmenu.html b/src/mypreferencesmenu.html index 25728bf352..8ef8117743 100644 --- a/src/mypreferencesmenu.html +++ b/src/mypreferencesmenu.html @@ -47,24 +47,6 @@ - - -
- photo -
-
${TabCameraUpload}
-
-
-
- - -
- file_download -
-
${HeaderOfflineSync}
-
-
-

@@ -77,12 +59,14 @@
-
- lock -
-
${ButtonSignOut}
+ +
+ lock +
+
${ButtonSignOut}
+
-
+
diff --git a/src/mysyncsettings.html b/src/mysyncsettings.html deleted file mode 100644 index 5c3fd5e024..0000000000 --- a/src/mysyncsettings.html +++ /dev/null @@ -1,40 +0,0 @@ -
- -
-
- -

- ${HeaderOfflineSync} -

- -
-
-
-
- -
- -
-
- -
- -
${LabelMaxAudioFileBitrateHelp}
-
- - -
-
-
\ No newline at end of file diff --git a/src/scripts/camerauploadsettings.js b/src/scripts/camerauploadsettings.js deleted file mode 100644 index cb05b9cdf1..0000000000 --- a/src/scripts/camerauploadsettings.js +++ /dev/null @@ -1,29 +0,0 @@ -define(["appSettings", "loading", "emby-checkbox"], function(appSettings, loading) { - "use strict"; - - function loadForm(page, user) { - var uploadServers = appSettings.cameraUploadServers(); - page.querySelector(".uploadServerList").innerHTML = ConnectionManager.getSavedServers().map(function(s) { - return '" - }).join(""), loading.hide() - } - - function saveUser(page) { - for (var chkUploadServer = page.querySelectorAll(".chkUploadServer"), cameraUploadServers = [], i = 0, length = chkUploadServer.length; i < length; i++) chkUploadServer[i].checked && cameraUploadServers.push(chkUploadServer[i].getAttribute("data-id")); - appSettings.cameraUploadServers(cameraUploadServers), window.MainActivity && MainActivity.authorizeStorage(), loading.hide() - } - return function(view, params) { - view.querySelector("form").addEventListener("submit", function(e) { - return loading.show(), saveUser(view), e.preventDefault(), !1 - }), view.addEventListener("viewshow", function() { - var page = this; - loading.show(); - var userId = params.userId || Dashboard.getCurrentUserId(); - ApiClient.getUser(userId).then(function(user) { - loadForm(page, user) - }) - }), view.addEventListener("viewbeforehide", function() { - saveUser(this) - }) - } -}); \ No newline at end of file diff --git a/src/scripts/mypreferencescommon.js b/src/scripts/mypreferencescommon.js index e7c58e64ef..ca800dfbb1 100644 --- a/src/scripts/mypreferencescommon.js +++ b/src/scripts/mypreferencescommon.js @@ -1,9 +1,12 @@ define(["apphost", "connectionManager", "listViewStyle", "emby-linkbutton"], function(appHost, connectionManager) { "use strict"; + return function(view, params) { view.querySelector(".btnLogout").addEventListener("click", function() { - Dashboard.logout() - }), view.addEventListener("viewshow", function() { + Dashboard.logout(); + }); + + view.addEventListener("viewshow", function() { var page = this; var userId = params.userId || Dashboard.getCurrentUserId(); @@ -12,27 +15,16 @@ define(["apphost", "connectionManager", "listViewStyle", "emby-linkbutton"], fun page.querySelector(".lnkSubtitleSettings").setAttribute("href", "mypreferencessubtitles.html?userId=" + userId); page.querySelector(".lnkHomeScreenPreferences").setAttribute("href", "mypreferenceshome.html?userId=" + userId); page.querySelector(".lnkMyProfile").setAttribute("href", "myprofile.html?userId=" + userId); - page.querySelector(".lnkSync").setAttribute("href", "mysyncsettings.html?userId=" + userId); - page.querySelector(".lnkCameraUpload").setAttribute("href", "camerauploadsettings.html?userId=" + userId); - - appHost.supports("cameraupload") - ? page.querySelector(".lnkCameraUpload").classList.remove("hide") - : page.querySelector(".lnkCameraUpload").classList.add("hide"); - - appHost.supports("sync") - ? page.querySelector(".lnkSync").classList.remove("hide") - : page.querySelector(".lnkSync").classList.add("hide"); + appHost.supports("multiserver") ? page.querySelector(".selectServer").classList.remove("hide") : page.querySelector(".selectServer").classList.add("hide"); connectionManager.user(ApiClient).then(function(user) { - user.localUser && !user.localUser.EnableAutoLogin ? view.querySelector(".btnLogout").classList.add("hide") : view.querySelector(".btnLogout").classList.remove("hide"); + user.localUser && !user.localUser.EnableAutoLogin ? view.querySelector(".btnLogout").classList.remove("hide") : view.querySelector(".btnLogout").classList.add("hide"); }); Dashboard.getCurrentUser().then(function(user) { page.querySelector(".headerUser").innerHTML = user.Name; user.Policy.IsAdministrator ? page.querySelector(".adminSection").classList.remove("hide") : page.querySelector(".adminSection").classList.add("hide"); }); - - appHost.supports("multiserver") ? page.querySelector(".selectServer").classList.remove("hide") : page.querySelector(".selectServer").classList.add("hide"); }) } }); \ No newline at end of file diff --git a/src/scripts/mysyncsettings.js b/src/scripts/mysyncsettings.js deleted file mode 100644 index c968acb2a1..0000000000 --- a/src/scripts/mysyncsettings.js +++ /dev/null @@ -1,33 +0,0 @@ -define(["appSettings", "apphost", "emby-checkbox", "emby-select", "emby-input"], function(appSettings, appHost) { - "use strict"; - - function loadForm(page, user) { - page.querySelector("#txtSyncPath").value = appSettings.syncPath() || "", page.querySelector("#chkWifi").checked = appSettings.syncOnlyOnWifi(), page.querySelector(".selectAudioBitrate").value = appSettings.maxStaticMusicBitrate() || "" - } - - function saveUser(page) { - var syncPath = page.querySelector("#txtSyncPath").value; - appSettings.syncPath(syncPath), appSettings.syncOnlyOnWifi(page.querySelector("#chkWifi").checked), appSettings.maxStaticMusicBitrate(page.querySelector(".selectAudioBitrate").value || null), require(["localsync"], function(localSync) { - localSync.sync() - }) - } - return function(view, params) { - view.querySelector("form").addEventListener("submit", function(e) { - return saveUser(view), e.preventDefault(), !1 - }), view.querySelector("#btnSelectSyncPath").addEventListener("click", function() { - require(["nativedirectorychooser"], function() { - NativeDirectoryChooser.chooseDirectory().then(function(path) { - path && (view.querySelector("#txtSyncPath").value = path) - }) - }) - }), view.addEventListener("viewshow", function() { - var page = this, - userId = getParameterByName("userId") || Dashboard.getCurrentUserId(); - ApiClient.getUser(userId).then(function(user) { - loadForm(page, user) - }), appHost.supports("customsyncpath") ? page.querySelector(".fldSyncPath").classList.remove("hide") : page.querySelector(".fldSyncPath").classList.add("hide") - }), view.addEventListener("viewbeforehide", function() { - saveUser(this) - }) - } -}); \ No newline at end of file diff --git a/src/scripts/site.js b/src/scripts/site.js index a7748cda20..d4b0c3df35 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -670,24 +670,12 @@ var Dashboard = { autoFocus: !1, transition: "fade", controller: "scripts/myprofile" - }), defineRoute({ - path: "/camerauploadsettings.html", - dependencies: [], - autoFocus: !1, - transition: "fade", - controller: "scripts/camerauploadsettings" }), defineRoute({ path: "/mysyncjob.html", dependencies: [], autoFocus: !1, transition: "fade", controller: "scripts/syncjob" - }), defineRoute({ - path: "/mysyncsettings.html", - dependencies: ["emby-checkbox", "emby-input", "emby-button", "paper-icon-button-light"], - autoFocus: !1, - transition: "fade", - controller: "scripts/mysyncsettings" }), defineRoute({ path: "/notificationsetting.html", dependencies: [], @@ -1118,7 +1106,6 @@ var Dashboard = { serverId = item.ServerId || options.serverId; if ("settings" === item) return "mypreferencesmenu.html"; if ("wizard" === item) return "wizardstart.html"; - if ("downloadsettings" === item) return "mysyncsettings.html"; if ("manageserver" === item) return "dashboard.html"; if ("recordedtv" === item) return "livetv.html?tab=3&serverId=" + options.serverId; if ("nextup" === item) return "list/list.html?type=nextup&serverId=" + options.serverId;