mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added frontend support for a password field on setup
This commit is contained in:
parent
0474bcfa8f
commit
a72fce15a6
5 changed files with 20 additions and 3 deletions
|
@ -26,7 +26,9 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
|||
apiClient.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
Name: form.querySelector("#txtUsername").value
|
||||
Name: form.querySelector("#txtUsername").value,
|
||||
Password: form.querySelector("#txtManualPassword").value
|
||||
|
||||
},
|
||||
url: apiClient.getUrl("Startup/User"),
|
||||
dataType: "json"
|
||||
|
@ -36,7 +38,12 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
|||
}
|
||||
|
||||
function onSubmit(e) {
|
||||
return submit(this), e.preventDefault(), !1
|
||||
|
||||
var form = this;
|
||||
return form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value ? require(["toast"], function(toast) {
|
||||
toast(Globalize.translate("PasswordMatchError"))
|
||||
}) : submit(this), e.preventDefault(), !1
|
||||
|
||||
}
|
||||
|
||||
function onViewShow() {
|
||||
|
@ -45,6 +52,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em
|
|||
apiClient = getApiClient();
|
||||
apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) {
|
||||
page.querySelector("#txtUsername").value = user.Name || "", loading.hide()
|
||||
page.querySelector("#txtManualPassword").value = user.Password || "", loading.hide()
|
||||
})
|
||||
}
|
||||
return function(view, params) {
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
"LabelUrl": "URL:",
|
||||
"LabelZipCode": "Post Code:",
|
||||
"LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.",
|
||||
"LeaveBlankToNotSetAPassword": "This field can be left blank.",
|
||||
"LinkApi": "API",
|
||||
"MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this API key? The application's connection to Jellyfin Server will be abruptly terminated.",
|
||||
"MessageForgotPasswordFileExpiration": "The reset PIN will expire at {0}.",
|
||||
|
|
|
@ -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.",
|
||||
"LatestFromLibrary": "Latest {0}",
|
||||
"LearnHowToCreateSynologyShares": "Learn how to share folders in Synology.",
|
||||
"LeaveBlankToNotSetAPassword": "This field can be left blank.",
|
||||
"LetterButtonAbbreviation": "A",
|
||||
"LibraryAccessHelp": "Select the media folders to share with this user. Administrators will be able to edit all folders using the metadata manager.",
|
||||
"LinkApi": "Api",
|
||||
|
|
|
@ -16,6 +16,13 @@
|
|||
<input is="emby-input" type="text" id="txtUsername" label="${LabelYourFirstName}" required="required" />
|
||||
<div class="fieldDescription">${MoreUsersCanBeAddedLater}</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 class="wizardNavigation">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue