Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add web path as config option #172

Merged
merged 3 commits into from
Mar 21, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ <h3>${HeaderPaths}</h3>
<div class="listItem listItem-border">
<div class="listItemBody two-line">
<div class="listItemBodyText secondary" style="margin:0;">${LabelTranscodingTemporaryFiles}</div>
<div class="listItemBodyText" id="transcodingTemporaryPath"></div>
<div class="listItemBodyText" id="transcodePath"></div>
</div>
</div>
<div class="listItem listItem-border">
<div class="listItemBody two-line">
<div class="listItemBodyText secondary" style="margin:0;">${LabelWeb}</div>
<div class="listItemBodyText" id="webPath"></div>
</div>
</div>
</div>
Expand Down
16 changes: 16 additions & 0 deletions src/dashboard/dashboardgeneral.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ 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();
Expand Down
10 changes: 10 additions & 0 deletions src/dashboardgeneral.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ <h2>${HeaderPaths}</h2>
<div class="fieldDescription">${LabelMetadataPathHelp}</div>
<input type="hidden" id="txtMetadataNetworkPath" />
</div>

<div class="inputContainer">
<div style="display: flex; align-items: center;">
<div style="flex-grow:1;">
<input is="emby-input" id="txtWebPath" label="${LabelWebPath}" autocomplete="off" />
</div>
<button type="button" is="paper-icon-button-light" id="btnSelectWebPath" title="${ButtonSelectDirectory}" class="emby-input-iconbutton"><i class="md-icon">search</i></button>
</div>
<div class="fieldDescription">${LabelWebPathHelp}</div>
</div>
</div>

<div class="verticalSection autoUpdatesContainer hide">
Expand Down
5 changes: 3 additions & 2 deletions src/scripts/dashboardpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 += "<p>";
html += task.Name + "<br/>";
if (task.State === "Running") {
Expand All @@ -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");
Expand Down
5 changes: 4 additions & 1 deletion src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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. Do not change this unless you plan on moving the web files, or the web interface will break.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather we not let users edit this via web UI (warning text is something no one would actually read).

"LabelMetadataReaders": "Metadata readers:",
"LabelMetadataReadersHelp": "Rank your preferred local metadata sources in order of priority. The first file found will be read.",
"LabelMetadataSavers": "Metadata savers:",
Expand Down Expand Up @@ -1329,6 +1331,7 @@
"LabelVideoCodec": "Video: {0}",
"LabelVideoType": "Video Type:",
"LabelView": "View:",
"LabelWeb": "Web",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"LabelWeb": "Web",
"LabelWeb": "Web UI",

maybe?

"LabelWebsite": "Website:",
"LabelWindowBackgroundColor": "Text background color:",
"LabelXDlnaCap": "X-Dlna cap:",
Expand Down Expand Up @@ -2265,4 +2268,4 @@
"XmlTvSportsCategoriesHelp": "Programs with these categories will be displayed as sports programs. Separate multiple with '|'.",
"Yes": "Yes",
"Yesterday": "Yesterday"
}
}