diff --git a/src/views/desktop/LoginPage.vue b/src/views/desktop/LoginPage.vue index 5a5e5390..194be69a 100644 --- a/src/views/desktop/LoginPage.vue +++ b/src/views/desktop/LoginPage.vue @@ -181,7 +181,11 @@ import { useSettingsStore } from '@/stores/setting.js'; import { useExchangeRatesStore } from '@/stores/exchangeRates.js'; import assetConstants from '@/consts/asset.js'; -import { isUserRegistrationEnabled, isUserForgetPasswordEnabled } from '@/lib/server_settings.js'; +import { + isUserRegistrationEnabled, + isUserForgetPasswordEnabled, + isUserVerifyEmailEnabled +} from '@/lib/server_settings.js'; import { mdiEyeOutline, @@ -244,6 +248,9 @@ export default { }, currentLanguageName() { return this.$locale.getCurrentLanguageDisplayName(); + }, + isUserVerifyEmailEnabled() { + return isUserVerifyEmailEnabled(); } }, setup() { @@ -312,7 +319,7 @@ export default { }).catch(error => { self.logining = false; - if (error.error && error.error.errorCode === 201020 && error.error.context && error.error.context.email) { + if (self.isUserVerifyEmailEnabled && error.error && error.error.errorCode === 201020 && error.error.context && error.error.context.email) { self.$router.push('/verify_email?email=' + encodeURIComponent(error.error.context.email)); return; } diff --git a/src/views/desktop/user/settings/tabs/UserBasicSettingTab.vue b/src/views/desktop/user/settings/tabs/UserBasicSettingTab.vue index 7d1752d3..2301588e 100644 --- a/src/views/desktop/user/settings/tabs/UserBasicSettingTab.vue +++ b/src/views/desktop/user/settings/tabs/UserBasicSettingTab.vue @@ -28,7 +28,7 @@ {{ $t('Email has been verified') }} {{ $t('Email has not been verified') }} + @click="resendVerifyEmail" v-if="isUserVerifyEmailEnabled && !loading && !emailVerified"> {{ $t('Resend Validation Email') }} @@ -235,6 +235,7 @@ import { useAccountsStore } from '@/stores/account.js'; import datetimeConstants from '@/consts/datetime.js'; import { getNameByKeyValue } from '@/lib/common.js'; import { getCategorizedAccounts } from '@/lib/account.js'; +import { isUserVerifyEmailEnabled } from '@/lib/server_settings.js'; import { mdiAccount @@ -317,6 +318,9 @@ export default { allTransactionEditScopeTypes() { return this.$locale.getAllTransactionEditScopeTypes(); }, + isUserVerifyEmailEnabled() { + return isUserVerifyEmailEnabled(); + }, inputIsNotChanged() { return !!this.inputIsNotChangedProblemMessage; }, diff --git a/src/views/mobile/users/UserProfilePage.vue b/src/views/mobile/users/UserProfilePage.vue index ce05befa..0c8c63ab 100644 --- a/src/views/mobile/users/UserProfilePage.vue +++ b/src/views/mobile/users/UserProfilePage.vue @@ -4,7 +4,7 @@ - + @@ -212,7 +212,7 @@ {{ $t('Resend Validation Email') }} @@ -240,6 +240,7 @@ import { useAccountsStore } from '@/stores/account.js'; import { getNameByKeyValue } from '@/lib/common.js'; import { getCategorizedAccounts } from '@/lib/account.js'; +import { isUserVerifyEmailEnabled } from '@/lib/server_settings.js'; export default { props: [ @@ -333,6 +334,9 @@ export default { currentDayOfWeekName() { return getNameByKeyValue(this.allWeekDays, this.newProfile.firstDayOfWeek, 'type', 'displayName'); }, + isUserVerifyEmailEnabled() { + return isUserVerifyEmailEnabled(); + }, inputIsNotChanged() { return !!this.inputIsNotChangedProblemMessage; },