blind changes - need updated sytleguide for verifying

This commit is contained in:
Ulf Gebhardt 2019-05-07 14:13:45 +02:00
parent e26b2eabcc
commit 34fa8cf29a
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3
2 changed files with 7 additions and 9 deletions

View File

@ -19,7 +19,7 @@
type="password" type="password"
:label="$t('settings.security.change-password.label-new-password-confirm')" :label="$t('settings.security.change-password.label-new-password-confirm')"
/> />
<!--<password-strength :password="newPassword" @change="e => passwordSecure = e.isSecure"/>--> <password-strength :password="formData.newPassword" @change="handlePasswordStrength"/>
<ds-space margin-top="base"> <ds-space margin-top="base">
<ds-button <ds-button
:loading="loading" :loading="loading"
@ -73,13 +73,9 @@ export default {
}, },
methods: { methods: {
async handleInput(data) { async handleInput(data) {
//return 'abcabc1234567!' // this.formData.newPassword
console.log('validation') console.log('validation')
console.log(data) console.log(data)
if ( if (data.newPassword && data.newPassword === data.confirmPassword) {
this.formData.newPassword &&
this.formData.newPassword === this.formData.confirmPassword
) {
this.disabled = false this.disabled = false
} else { } else {
this.disabled = true this.disabled = true
@ -105,6 +101,9 @@ export default {
} finally { } finally {
this.loading = false this.loading = false
} }
},
handlePasswordStrength(e) {
console.log(e.isSecure)
} }
} }
} }

View File

@ -45,7 +45,7 @@ export default {
* @return {Number} Password Strength Score * @return {Number} Password Strength Score
*/ */
passwordStrength() { passwordStrength() {
/*const score = !isEmpty(this.pass) ? zxcvbn(this.pass).score : 0 const score = !isEmpty(this.pass) ? zxcvbn(this.pass).score : 0
if (score !== this.lastScore) { if (score !== this.lastScore) {
this.lastScore = score this.lastScore = score
this.$emit('change', { this.$emit('change', {
@ -53,8 +53,7 @@ export default {
isSecure: Boolean(score >= 3) isSecure: Boolean(score >= 3)
}) })
} }
return score*/ return score
return 0
}, },
strengthClass() { strengthClass() {
return `strength-${this.passwordStrength}` return `strength-${this.passwordStrength}`