mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-10 19:31:39 +00:00
Update: login form toast strings
This commit is contained in:
parent
da101a17af
commit
9318b48634
3 changed files with 13 additions and 8 deletions
|
|
@ -117,10 +117,10 @@ export default {
|
||||||
},
|
},
|
||||||
submitChangePassword() {
|
submitChangePassword() {
|
||||||
if (this.newPassword !== this.confirmPassword) {
|
if (this.newPassword !== this.confirmPassword) {
|
||||||
return this.$toast.error('New password and confirm password do not match')
|
return this.$toast.error(this.$strings.ToastUserPasswordMismatch)
|
||||||
}
|
}
|
||||||
if (this.password === this.newPassword) {
|
if (this.password === this.newPassword) {
|
||||||
return this.$toast.error('Password and New Password cannot be the same')
|
return this.$toast.error(this.$strings.ToastUserPasswordMustChange)
|
||||||
}
|
}
|
||||||
this.changingPassword = true
|
this.changingPassword = true
|
||||||
this.$axios
|
this.$axios
|
||||||
|
|
@ -130,7 +130,7 @@ export default {
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$toast.success('Password Changed Successfully')
|
this.$toast.success(this.$strings.ToastUserPasswordChangeSuccess)
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
} else {
|
} else {
|
||||||
this.$toast.error(res.error || 'Unknown Error')
|
this.$toast.error(res.error || 'Unknown Error')
|
||||||
|
|
@ -139,7 +139,7 @@ export default {
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
this.$toast.error('Api call failed')
|
this.$toast.error(this.$strings.ToastApiCallFailed)
|
||||||
this.changingPassword = false
|
this.changingPassword = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,11 +132,11 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async submitServerSetup() {
|
async submitServerSetup() {
|
||||||
if (!this.newRoot.username || !this.newRoot.username.trim()) {
|
if (!this.newRoot.username || !this.newRoot.username.trim()) {
|
||||||
this.$toast.error('Must enter a root username')
|
this.$toast.error(this.$strings.ToastUserRootRequireName)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.newRoot.password !== this.confirmPassword) {
|
if (this.newRoot.password !== this.confirmPassword) {
|
||||||
this.$toast.error('Password mismatch')
|
this.$toast.error(this.$strings.ToastUserPasswordMismatch)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.newRoot.password) {
|
if (!this.newRoot.password) {
|
||||||
|
|
|
||||||
|
|
@ -806,6 +806,7 @@
|
||||||
"StatsYearInReview": "YEAR IN REVIEW",
|
"StatsYearInReview": "YEAR IN REVIEW",
|
||||||
"ToastAccountUpdateFailed": "Failed to update account",
|
"ToastAccountUpdateFailed": "Failed to update account",
|
||||||
"ToastAccountUpdateSuccess": "Account updated",
|
"ToastAccountUpdateSuccess": "Account updated",
|
||||||
|
"ToastApiCallFailed": "API call failed",
|
||||||
"ToastAuthorImageRemoveFailed": "Failed to remove image",
|
"ToastAuthorImageRemoveFailed": "Failed to remove image",
|
||||||
"ToastAuthorImageRemoveSuccess": "Author image removed",
|
"ToastAuthorImageRemoveSuccess": "Author image removed",
|
||||||
"ToastAuthorUpdateFailed": "Failed to update author",
|
"ToastAuthorUpdateFailed": "Failed to update author",
|
||||||
|
|
@ -909,5 +910,9 @@
|
||||||
"ToastUnlinkOpenIdFailed": "Failed to unlink user from OpenID",
|
"ToastUnlinkOpenIdFailed": "Failed to unlink user from OpenID",
|
||||||
"ToastUnlinkOpenIdSuccess": "User unlinked from OpenID",
|
"ToastUnlinkOpenIdSuccess": "User unlinked from OpenID",
|
||||||
"ToastUserDeleteFailed": "Failed to delete user",
|
"ToastUserDeleteFailed": "Failed to delete user",
|
||||||
"ToastUserDeleteSuccess": "User deleted"
|
"ToastUserDeleteSuccess": "User deleted",
|
||||||
|
"ToastUserPasswordChangeSuccess": "Password changed successfully",
|
||||||
|
"ToastUserPasswordMismatch": "Passwords do not match",
|
||||||
|
"ToastUserPasswordMustChange": "New password cannot match old password",
|
||||||
|
"ToastUserRootRequireName": "Must enter a root username"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue