diff --git a/src/components/common/PinCodeInput.vue b/src/components/common/PinCodeInput.vue index 3c92d81e..1eec814e 100644 --- a/src/components/common/PinCodeInput.vue +++ b/src/components/common/PinCodeInput.vue @@ -7,6 +7,7 @@ :ref="`pin-code-input-${index}`" :value="codes[index].value" :type="codes[index].inputType" + :disabled="disabled ? 'disabled' : undefined" :autofocus="autofocus && index === 0 ? 'autofocus' : undefined" @focus="codes[index].focused = true" @blur="codes[index].focused = false" @@ -22,6 +23,7 @@ export default { props: [ 'modelValue', + 'disabled', 'autofocus', 'secure', 'length' diff --git a/src/views/desktop/LoginPage.vue b/src/views/desktop/LoginPage.vue index 4a640264..21158c72 100644 --- a/src/views/desktop/LoginPage.vue +++ b/src/views/desktop/LoginPage.vue @@ -34,7 +34,7 @@ autocomplete="username" autofocus="autofocus" clearable - :disabled="show2faInput" + :disabled="show2faInput || logining || verifying" :label="$t('Username')" :placeholder="$t('Your username or email')" v-model="username" @@ -49,7 +49,7 @@ clearable ref="passwordInput" :type="isPasswordVisible ? 'text' : 'password'" - :disabled="show2faInput" + :disabled="show2faInput || logining || verifying" :label="$t('Password')" :placeholder="$t('Your password')" :append-inner-icon="isPasswordVisible ? icons.eyeSlash : icons.eye" @@ -66,6 +66,7 @@ autocomplete="one-time-code" clearable ref="passcodeInput" + :disabled="logining || verifying" :label="$t('Passcode')" :placeholder="$t('Passcode')" :append-inner-icon="icons.backupCode" @@ -77,6 +78,7 @@ - {{ $t('Log In') }} + - {{ $t('Continue') }} + @@ -108,7 +112,9 @@ @@ -138,14 +144,6 @@ - - - - - - - - diff --git a/src/views/desktop/SignupPage.vue b/src/views/desktop/SignupPage.vue index 324bb075..4bd8645e 100644 --- a/src/views/desktop/SignupPage.vue +++ b/src/views/desktop/SignupPage.vue @@ -153,13 +153,17 @@ - @@ -174,7 +178,7 @@ -
+

{{ getCategoryTypeName(categoryType) }}

@@ -210,29 +214,28 @@
{{ $t('Previous') }} {{ $t('Next') }} {{ $t('Submit') }} + v-if="currentStep === 'presetCategories'"> + {{ $t('Submit') }} + +
- - - -
@@ -381,6 +384,10 @@ export default { }, methods: { switchToTab(tabName) { + if (this.submitting) { + return; + } + if (tabName === 'basicSetting') { this.currentStep = 'basicSetting'; } else if (tabName === 'presetCategories') { diff --git a/src/views/desktop/UnlockPage.vue b/src/views/desktop/UnlockPage.vue index 4c9cdfd1..7515d749 100644 --- a/src/views/desktop/UnlockPage.vue +++ b/src/views/desktop/UnlockPage.vue @@ -30,21 +30,23 @@ - - {{ $t('Unlock By PIN Code') }} - {{ $t('Unlock By WebAuthn') }} + @@ -58,7 +60,9 @@ @@ -89,10 +93,6 @@ - - - -
@@ -113,7 +113,7 @@ export default { data() { return { pinCode: '', - verifying: false + verifyingByWebAuthn: false }; }, computed: { @@ -166,13 +166,13 @@ export default { return; } - this.verifying = true; + this.verifyingByWebAuthn = true; webauthn.verifyCredential( self.userStore.currentUserInfo, self.$user.getWebAuthnCredentialId() ).then(({ id, userName, userSecret }) => { - this.verifying = false; + this.verifyingByWebAuthn = false; self.$user.unlockTokenByWebAuthn(id, userName, userSecret); self.tokensStore.refreshTokenAndRevokeOldToken().then(response => { @@ -188,7 +188,7 @@ export default { self.$router.replace('/'); }).catch(error => { - this.verifying = false; + this.verifyingByWebAuthn = false; logger.error('failed to use webauthn to verify', error); if (error.notSupported) {