mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
register page: add password confirm field
This commit is contained in:
parent
8a1a97afa5
commit
00fad8c943
2 changed files with 18 additions and 1 deletions
|
@ -25,6 +25,17 @@
|
||||||
@keyup.enter="register"
|
@keyup.enter="register"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<input
|
||||||
|
v-model="passwordConfirm"
|
||||||
|
class="input"
|
||||||
|
type="password"
|
||||||
|
autocomplete="password"
|
||||||
|
:placeholder="$t('login.password_confirm')"
|
||||||
|
:aria-label="$t('login.password_confirm')"
|
||||||
|
@keyup.enter="register"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a v-t="'titles.register'" class="btn w-auto" @click="register" />
|
<a v-t="'titles.register'" class="btn w-auto" @click="register" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,6 +79,10 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
register() {
|
register() {
|
||||||
if (!this.username || !this.password) return;
|
if (!this.username || !this.password) return;
|
||||||
|
if (this.password != this.passwordConfirm) {
|
||||||
|
alert(this.$t("login.passwords_incorrect"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isEmail(this.username) && !this.forceUnsecureRegister) {
|
if (isEmail(this.username) && !this.forceUnsecureRegister) {
|
||||||
this.showUnsecureRegisterDialog = true;
|
this.showUnsecureRegisterDialog = true;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -162,7 +162,9 @@
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"username": "Username",
|
"username": "Username",
|
||||||
"password": "Password"
|
"password": "Password",
|
||||||
|
"password_confirm": "Confirm password",
|
||||||
|
"passwords_incorrect": "Passwords don't match!"
|
||||||
},
|
},
|
||||||
"video": {
|
"video": {
|
||||||
"videos": "Videos",
|
"videos": "Videos",
|
||||||
|
|
Loading…
Reference in a new issue