From 9d462263b9523f34d454a3e02ac04819c24638c7 Mon Sep 17 00:00:00 2001 From: dkanada Date: Mon, 11 Mar 2019 21:31:33 -0700 Subject: [PATCH 1/3] add web path as config option --- src/dashboard.html | 8 +++++++- src/dashboard/dashboardgeneral.js | 17 +++++++++++++++++ src/dashboardgeneral.html | 10 ++++++++++ src/scripts/dashboardpage.js | 5 +++-- src/strings/en-us.json | 3 +++ 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/dashboard.html b/src/dashboard.html index d2de21f1669..6c751740c34 100644 --- a/src/dashboard.html +++ b/src/dashboard.html @@ -109,7 +109,13 @@

${HeaderPaths}

${LabelTranscodingTemporaryFiles}
-
+
+
+
+
+
+
${LabelWeb}
+
diff --git a/src/dashboard/dashboardgeneral.js b/src/dashboard/dashboardgeneral.js index c0ff217ffec..6ef1c4d2211 100644 --- a/src/dashboard/dashboardgeneral.js +++ b/src/dashboard/dashboardgeneral.js @@ -109,6 +109,23 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb }) }); + $("#btnSelectWebPath", view).on("click.selectDirectory", function() { + require(["directorybrowser"], function(directoryBrowser) { + var picker = new directoryBrowser; + picker.show({ + callback: function(path) { + if (path) { + view.querySelector("#txtWebPath").value = path; + } + picker.close(); + }, + validateWriteable: true, + header: Globalize.translate("LabelWebPath"), + instruction: Globalize.translate("LabelWebPathHelp") + }) + }) + }); + $(".dashboardGeneralForm", view).off("submit", onSubmit).on("submit", onSubmit); view.addEventListener("viewshow", function() { var promiseConfig = ApiClient.getServerConfiguration(); diff --git a/src/dashboardgeneral.html b/src/dashboardgeneral.html index f95246708ff..8cc11771678 100644 --- a/src/dashboardgeneral.html +++ b/src/dashboardgeneral.html @@ -55,6 +55,16 @@

${HeaderPaths}

${LabelMetadataPathHelp}
+ +
+
+
+ +
+ +
+
${LabelWebPathHelp}
+
diff --git a/src/scripts/dashboardpage.js b/src/scripts/dashboardpage.js index f7bbc86866d..0dc1f4e6fa2 100644 --- a/src/scripts/dashboardpage.js +++ b/src/scripts/dashboardpage.js @@ -383,7 +383,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa for (var i = 0, length = tasks.length; i < length; i++) { var task = tasks[i]; - + html += "

"; html += task.Name + "
"; if (task.State === "Running") { @@ -407,8 +407,9 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa renderPaths: function (page, systemInfo) { page.querySelector("#cachePath").innerHTML = systemInfo.CachePath; page.querySelector("#logPath").innerHTML = systemInfo.LogPath; - page.querySelector("#transcodingTemporaryPath").innerHTML = systemInfo.TranscodingTempPath; + page.querySelector("#transcodePath").innerHTML = systemInfo.TranscodingTempPath; page.querySelector("#metadataPath").innerHTML = systemInfo.InternalMetadataPath; + page.querySelector("#webPath").innerHTML = systemInfo.WebPath; }, startInterval: function (apiClient) { apiClient.sendMessage("SessionsStart", "0,1500"); diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 5ac13f0aad1..6fe64cdf4a0 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1122,6 +1122,8 @@ "LabelMetadataDownloadersHelp": "Enable and rank your preferred metadata downloaders in order of priority. Lower priority downloaders will only be used to fill in missing information.", "LabelMetadataPath": "Metadata path:", "LabelMetadataPathHelp": "Specify a custom location for downloaded artwork and metadata.", + "LabelWebPath": "Web path:", + "LabelWebPathHelp": "The path where the web client source is located.", "LabelMetadataReaders": "Metadata readers:", "LabelMetadataReadersHelp": "Rank your preferred local metadata sources in order of priority. The first file found will be read.", "LabelMetadataSavers": "Metadata savers:", @@ -1329,6 +1331,7 @@ "LabelVideoCodec": "Video: {0}", "LabelVideoType": "Video Type:", "LabelView": "View:", + "LabelWeb": "Web", "LabelWebsite": "Website:", "LabelWindowBackgroundColor": "Text background color:", "LabelXDlnaCap": "X-Dlna cap:", From ca9e5d83bfb71c8eb77cfc1e3faaed31e645b66d Mon Sep 17 00:00:00 2001 From: dkanada Date: Thu, 14 Mar 2019 00:05:45 -0700 Subject: [PATCH 2/3] remove write check and add warning to the description --- src/dashboard/dashboardgeneral.js | 1 - src/strings/en-us.json | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dashboard/dashboardgeneral.js b/src/dashboard/dashboardgeneral.js index 6ef1c4d2211..7ecd7cb1c93 100644 --- a/src/dashboard/dashboardgeneral.js +++ b/src/dashboard/dashboardgeneral.js @@ -119,7 +119,6 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb } picker.close(); }, - validateWriteable: true, header: Globalize.translate("LabelWebPath"), instruction: Globalize.translate("LabelWebPathHelp") }) diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 6fe64cdf4a0..dca0c0797e8 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1123,7 +1123,7 @@ "LabelMetadataPath": "Metadata path:", "LabelMetadataPathHelp": "Specify a custom location for downloaded artwork and metadata.", "LabelWebPath": "Web path:", - "LabelWebPathHelp": "The path where the web client source is located.", + "LabelWebPathHelp": "The path where the web client source is located. Do not change this unless you plan on moving the web files, or the web interface will break.", "LabelMetadataReaders": "Metadata readers:", "LabelMetadataReadersHelp": "Rank your preferred local metadata sources in order of priority. The first file found will be read.", "LabelMetadataSavers": "Metadata savers:", @@ -2268,4 +2268,4 @@ "XmlTvSportsCategoriesHelp": "Programs with these categories will be displayed as sports programs. Separate multiple with '|'.", "Yes": "Yes", "Yesterday": "Yesterday" -} \ No newline at end of file +} From ae7b8d59f2991de39e05db64737fe90c197b8a61 Mon Sep 17 00:00:00 2001 From: dkanada Date: Mon, 18 Mar 2019 22:58:48 -0700 Subject: [PATCH 3/3] remove web path modify option --- src/dashboard/dashboardgeneral.js | 18 +----------------- src/dashboardgeneral.html | 10 ---------- src/strings/en-us.json | 2 -- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/dashboard/dashboardgeneral.js b/src/dashboard/dashboardgeneral.js index 7ecd7cb1c93..ed3b000b12b 100644 --- a/src/dashboard/dashboardgeneral.js +++ b/src/dashboard/dashboardgeneral.js @@ -97,7 +97,7 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb $("#txtMetadataPath", view).val(path); } if (networkPath) { - $("#txtMetadataNetworkPath", view).val(networkPath)); + $("#txtMetadataNetworkPath", view).val(networkPath); } picker.close(); }, @@ -109,22 +109,6 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb }) }); - $("#btnSelectWebPath", view).on("click.selectDirectory", function() { - require(["directorybrowser"], function(directoryBrowser) { - var picker = new directoryBrowser; - picker.show({ - callback: function(path) { - if (path) { - view.querySelector("#txtWebPath").value = path; - } - picker.close(); - }, - header: Globalize.translate("LabelWebPath"), - instruction: Globalize.translate("LabelWebPathHelp") - }) - }) - }); - $(".dashboardGeneralForm", view).off("submit", onSubmit).on("submit", onSubmit); view.addEventListener("viewshow", function() { var promiseConfig = ApiClient.getServerConfiguration(); diff --git a/src/dashboardgeneral.html b/src/dashboardgeneral.html index 8cc11771678..f95246708ff 100644 --- a/src/dashboardgeneral.html +++ b/src/dashboardgeneral.html @@ -55,16 +55,6 @@

${HeaderPaths}

${LabelMetadataPathHelp}
- -
-
-
- -
- -
-
${LabelWebPathHelp}
-
diff --git a/src/strings/en-us.json b/src/strings/en-us.json index dca0c0797e8..f29c5ac6ff3 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1122,8 +1122,6 @@ "LabelMetadataDownloadersHelp": "Enable and rank your preferred metadata downloaders in order of priority. Lower priority downloaders will only be used to fill in missing information.", "LabelMetadataPath": "Metadata path:", "LabelMetadataPathHelp": "Specify a custom location for downloaded artwork and metadata.", - "LabelWebPath": "Web path:", - "LabelWebPathHelp": "The path where the web client source is located. Do not change this unless you plan on moving the web files, or the web interface will break.", "LabelMetadataReaders": "Metadata readers:", "LabelMetadataReadersHelp": "Rank your preferred local metadata sources in order of priority. The first file found will be read.", "LabelMetadataSavers": "Metadata savers:",