diff --git a/src/App.vue b/src/App.vue index 0eb764f7c572cb101235fefbf7f5fdd425515fde..49573a6433d388df2056e8a26a2b9dc327f15aac 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,8 +11,10 @@ export default { data() { const recoveryEmail = loadState('email-recovery', 'recoveryEmail') const unverifiedRecoveryEmail = loadState('email-recovery', 'unverifiedRecoveryEmail') + const recoveryEmailVerificationStatus = loadState('email-recovery', 'recoveryEmailVerificationStatus') return { + verifiedRecoveryEmail: recoveryEmail, recoveryEmail: recoveryEmail || unverifiedRecoveryEmail, unverifiedRecoveryEmail, errorKey: '', @@ -20,13 +22,19 @@ export default { showError: false, placeholder: t('email-recovery', 'Recovery Email'), value: t('email-recovery', 'Change Recovery Email'), - recoveryEmailVerificationStatus: loadState('email-recovery', 'recoveryEmailVerificationStatus'), + recoveryEmailVerificationStatus, apiInProgress: false, } }, computed: { isButtonDisabled() { - return this.recoveryEmail === this.unverifiedRecoveryEmail || this.recoveryEmail === loadState('email-recovery', 'recoveryEmail') || this.recoveryEmail.trim() === '' || this.apiInProgress + return this.recoveryEmail === this.unverifiedRecoveryEmail || this.recoveryEmail === this.verifiedRecoveryEmail || this.recoveryEmail.trim() === '' || this.apiInProgress + }, + isResendButtonDisabled() { + return !(this.recoveryEmail === this.unverifiedRecoveryEmail || this.recoveryEmail === this.verifiedRecoveryEmail || this.recoveryEmail.trim() === '' || this.apiInProgress) + }, + isResendButtonVisible() { + return (this.recoveryEmailVerificationStatus !== true && this.unverifiedRecoveryEmail !== '') }, }, methods: { diff --git a/src/main.html b/src/main.html index 4a30c3972240bfd7394f3b1693994fe2ae6de893..3e42f24edceb4e1997bee6e00f99cd136ad342c2 100644 --- a/src/main.html +++ b/src/main.html @@ -23,10 +23,10 @@