adding toggle password to be able to see it

Signed-off-by: Phie <phie@phie.ovh>
This commit is contained in:
Phie 2019-06-05 14:41:59 +02:00 committed by Roeland Jago Douma
parent 6fed189a13
commit 8fa2d70e9e
No known key found for this signature in database
GPG Key ID: F941078878347C0C
4 changed files with 25 additions and 3 deletions

View File

@ -228,6 +228,15 @@ input[type='email'] {
border: none;
font-weight: normal;
}
input[type='password'].password-with-toggle, input[type='text'].password-with-toggle {
width: 219px;
padding-right: 40px;
}
.toggle-password {
position: absolute;
top: 17px;
right: 20px;
}
input.login {
width: 260px;
height: 50px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -65,7 +65,8 @@
<p class="groupbottom"
:class="{shake: invalidPassword}">
<input type="password"
<input :type="passwordInputType"
class="password-with-toggle"
name="password"
id="password"
ref="password"
@ -75,6 +76,9 @@
required>
<label for="password"
class="infield">{{ t('Password') }}</label>
<a href="#" @click.stop.prevent="togglePassword" class="toggle-password">
<img :src="OC.imagePath('core', 'actions/toggle.svg')"/>
</a>
</p>
<div id="submit-wrapper">
@ -162,6 +166,7 @@
timezoneOffset: (-new Date().getTimezoneOffset() / 60),
user: this.username,
password: '',
passwordInputType: 'password',
}
},
computed: {
@ -186,6 +191,14 @@
}
},
methods: {
togglePassword () {
if(this.passwordInputType === 'password'){
this.passwordInputType = 'text'
}
else{
this.passwordInputType = 'password'
}
},
updateUsername () {
this.$emit('update:username', this.user)
},