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"
 | 
			
		||||
                />
 | 
			
		||||
            </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>
 | 
			
		||||
                <a v-t="'titles.register'" class="btn w-auto" @click="register" />
 | 
			
		||||
            </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -68,6 +79,10 @@ export default {
 | 
			
		|||
    methods: {
 | 
			
		||||
        register() {
 | 
			
		||||
            if (!this.username || !this.password) return;
 | 
			
		||||
            if (this.password != this.passwordConfirm) {
 | 
			
		||||
                alert(this.$t("login.passwords_incorrect"));
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            if (isEmail(this.username) && !this.forceUnsecureRegister) {
 | 
			
		||||
                this.showUnsecureRegisterDialog = true;
 | 
			
		||||
                return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -162,7 +162,9 @@
 | 
			
		|||
    },
 | 
			
		||||
    "login": {
 | 
			
		||||
        "username": "Username",
 | 
			
		||||
        "password": "Password"
 | 
			
		||||
        "password": "Password",
 | 
			
		||||
        "password_confirm": "Confirm password",
 | 
			
		||||
        "passwords_incorrect": "Passwords don't match!"
 | 
			
		||||
    },
 | 
			
		||||
    "video": {
 | 
			
		||||
        "videos": "Videos",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue