diff options
author | Phie <phie@phie.ovh> | 2019-06-05 15:41:59 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-09 11:54:21 +0300 |
commit | 8fa2d70e9e9c238926f8683577beb88257cb3678 (patch) | |
tree | c2b25c5fdb0b10bad596656bf256378085d62692 /core/src | |
parent | 6fed189a13c71fc52762e41105b9f7164b68f090 (diff) |
adding toggle password to be able to see it
Signed-off-by: Phie <phie@phie.ovh>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/components/login/LoginForm.vue | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/src/components/login/LoginForm.vue b/core/src/components/login/LoginForm.vue index dc9ef779f98..5574d65a059 100644 --- a/core/src/components/login/LoginForm.vue +++ b/core/src/components/login/LoginForm.vue @@ -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) }, |