mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #92 from RazeLighter777/master
Added frontend support for a password field on setup
This commit is contained in:
commit
54ca76dc8a
6 changed files with 26 additions and 5 deletions
|
@ -18,6 +18,7 @@
|
||||||
- [ViXXoR](https://github.com/ViXXoR)
|
- [ViXXoR](https://github.com/ViXXoR)
|
||||||
- [nkmerrill] (https://github.com/nkmerrill)
|
- [nkmerrill] (https://github.com/nkmerrill)
|
||||||
- [TtheCreator] (https://github.com/Tthecreator)
|
- [TtheCreator] (https://github.com/Tthecreator)
|
||||||
|
- [RazeLighter777](https://github.com/RazeLighter777)
|
||||||
|
|
||||||
# Emby Contributors
|
# Emby Contributors
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: {
|
data: {
|
||||||
Name: form.querySelector("#txtUsername").value
|
Name: form.querySelector("#txtUsername").value,
|
||||||
|
Password: form.querySelector("#txtManualPassword").value
|
||||||
},
|
},
|
||||||
url: apiClient.getUrl("Startup/User"),
|
url: apiClient.getUrl("Startup/User"),
|
||||||
dataType: "json"
|
dataType: "json"
|
||||||
|
@ -36,7 +37,16 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
return submit(this), e.preventDefault(), !1
|
var form = this;
|
||||||
|
if (form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value) {
|
||||||
|
require(["toast"], function(toast) {
|
||||||
|
toast(Globalize.translate("PasswordMatchError"));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
submit(form);
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onViewShow() {
|
function onViewShow() {
|
||||||
|
@ -44,7 +54,9 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
||||||
var page = this,
|
var page = this,
|
||||||
apiClient = getApiClient();
|
apiClient = getApiClient();
|
||||||
apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) {
|
apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) {
|
||||||
page.querySelector("#txtUsername").value = user.Name || "", loading.hide()
|
page.querySelector("#txtUsername").value = user.Name || "";
|
||||||
|
page.querySelector("#txtManualPassword").value = user.Password || "";
|
||||||
|
loading.hide();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return function(view, params) {
|
return function(view, params) {
|
||||||
|
|
|
@ -122,5 +122,5 @@
|
||||||
"XmlTvMovieCategoriesHelp": "Programmes with these categories will be displayed as movies. Separate multiple with '|'.",
|
"XmlTvMovieCategoriesHelp": "Programmes with these categories will be displayed as movies. Separate multiple with '|'.",
|
||||||
"XmlTvNewsCategoriesHelp": "Programmes with these categories will be displayed as news programmes. Separate multiple with '|'.",
|
"XmlTvNewsCategoriesHelp": "Programmes with these categories will be displayed as news programmes. Separate multiple with '|'.",
|
||||||
"XmlTvPathHelp": "A path to an XML TV file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.",
|
"XmlTvPathHelp": "A path to an XML TV file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.",
|
||||||
"XmlTvSportsCategoriesHelp": "Programmes with these categories will be displayed as sports programmes. Separate multiple with '|'.",
|
"XmlTvSportsCategoriesHelp": "Programmes with these categories will be displayed as sports programmes. Separate multiple with '|'."
|
||||||
}
|
}
|
||||||
|
|
|
@ -1028,6 +1028,7 @@
|
||||||
"LanNetworksHelp": "Comma separated list of IP addresses or IP/netmask entries for networks that will be considered on local network when enforcing bandwidth restrictions. If set, all other IP addresses will be considered to be on the external network and will be subject to the external bandwidth restrictions. If left blank, only the server's subnet is considered to be on the local network.",
|
"LanNetworksHelp": "Comma separated list of IP addresses or IP/netmask entries for networks that will be considered on local network when enforcing bandwidth restrictions. If set, all other IP addresses will be considered to be on the external network and will be subject to the external bandwidth restrictions. If left blank, only the server's subnet is considered to be on the local network.",
|
||||||
"LatestFromLibrary": "Latest {0}",
|
"LatestFromLibrary": "Latest {0}",
|
||||||
"LearnHowToCreateSynologyShares": "Learn how to share folders in Synology.",
|
"LearnHowToCreateSynologyShares": "Learn how to share folders in Synology.",
|
||||||
|
"LeaveBlankToNotSetAPassword": "Optional - leave blank to set no password",
|
||||||
"LetterButtonAbbreviation": "A",
|
"LetterButtonAbbreviation": "A",
|
||||||
"LibraryAccessHelp": "Select the media folders to share with this user. Administrators will be able to edit all folders using the metadata manager.",
|
"LibraryAccessHelp": "Select the media folders to share with this user. Administrators will be able to edit all folders using the metadata manager.",
|
||||||
"LinkApi": "Api",
|
"LinkApi": "Api",
|
||||||
|
|
|
@ -16,6 +16,13 @@
|
||||||
<input is="emby-input" type="text" id="txtUsername" label="${LabelYourFirstName}" required="required" />
|
<input is="emby-input" type="text" id="txtUsername" label="${LabelYourFirstName}" required="required" />
|
||||||
<div class="fieldDescription">${MoreUsersCanBeAddedLater}</div>
|
<div class="fieldDescription">${MoreUsersCanBeAddedLater}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" id="txtManualPassword" type="password" label="${LabelPassword}" />
|
||||||
|
<div class="fieldDescription">${LeaveBlankToNotSetAPassword}</div>
|
||||||
|
</div>
|
||||||
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" id="txtPasswordConfirm" type="password" label="${LabelPasswordConfirm}" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wizardNavigation">
|
<div class="wizardNavigation">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue