Browse Source

adding toggle password to be able to see it

Signed-off-by: Phie <phie@phie.ovh>
tags/v17.0.0beta1
Phie 5 years ago
parent
commit
8fa2d70e9e
No account linked to committer's email address
4 changed files with 25 additions and 3 deletions
  1. 9
    0
      core/css/guest.css
  2. 1
    1
      core/js/dist/login.js
  3. 1
    1
      core/js/dist/login.js.map
  4. 14
    1
      core/src/components/login/LoginForm.vue

+ 9
- 0
core/css/guest.css 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;

+ 1
- 1
core/js/dist/login.js
File diff suppressed because it is too large
View File


+ 1
- 1
core/js/dist/login.js.map
File diff suppressed because it is too large
View File


+ 14
- 1
core/src/components/login/LoginForm.vue 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)
},

Loading…
Cancel
Save