diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index a3fc9446f..c5b8c2e5c 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -242,6 +242,7 @@ "ReLogin": "重新登录" }, "common": { + "Setting": "设置", "ViewMore": "查看更多", "Announcement": "公告", "Logging": "日志记录", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 47f1aa0fb..3284f1219 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -236,6 +236,7 @@ "ReLogin": "Re-Login" }, "common": { + "Setting": "Setting", "ViewMore": "View more", "Announcement": "Announcement", "Logging": "Logging", diff --git a/src/userviews/users/UserProfile/ProfileInfo.vue b/src/userviews/users/UserProfile/ProfileInfo.vue index eb4c27386..5777e7028 100644 --- a/src/userviews/users/UserProfile/ProfileInfo.vue +++ b/src/userviews/users/UserProfile/ProfileInfo.vue @@ -115,36 +115,13 @@ export default { title: this.$t('users.SetMFA'), attrs: { type: 'primary', - label: this.object.mfa_enabled ? this.$t('common.Disable') : this.$t('common.Enable'), + label: this.$t('common.Setting'), disabled: this.object.mfa_force_enabled }, callbacks: { click: function() { - if (this.object.mfa_enabled) { - if (!this.object.mfa_force_enabled) { - window.location.href = `/core/auth/profile/otp/disable/authentication/?next=${this.$route.fullPath}` - } - } else { - window.location.href = `/core/auth/profile/otp/enable/start/?next=${this.$route.fullPath}` - } - }.bind(this) - } - }, - { - title: this.$t('users.UpdateMFA'), - attrs: { - type: 'primary', - label: this.$t('common.Update') - }, - has: this.object.mfa_enabled, - callbacks: { - click: function() { - if (this.$store.state.users.profile.is_otp_secret_key_bound) { - window.location.href = `/core/auth/profile/otp/update/?next=${this.$route.fullPath}` - } else { - window.location.href = `/core/auth/profile/otp/enable/start/?next=${this.$route.fullPath}` - } - }.bind(this) + window.location.href = `/core/auth/profile/mfa/` + } } }, {