perf: 修改翻译

This commit is contained in:
ibuler
2021-11-10 17:10:39 +08:00
committed by 老广
parent 2d174bc46d
commit 27332dffb8
3 changed files with 5 additions and 26 deletions

View File

@@ -242,6 +242,7 @@
"ReLogin": "重新登录" "ReLogin": "重新登录"
}, },
"common": { "common": {
"Setting": "设置",
"ViewMore": "查看更多", "ViewMore": "查看更多",
"Announcement": "公告", "Announcement": "公告",
"Logging": "日志记录", "Logging": "日志记录",

View File

@@ -236,6 +236,7 @@
"ReLogin": "Re-Login" "ReLogin": "Re-Login"
}, },
"common": { "common": {
"Setting": "Setting",
"ViewMore": "View more", "ViewMore": "View more",
"Announcement": "Announcement", "Announcement": "Announcement",
"Logging": "Logging", "Logging": "Logging",

View File

@@ -115,36 +115,13 @@ export default {
title: this.$t('users.SetMFA'), title: this.$t('users.SetMFA'),
attrs: { attrs: {
type: 'primary', 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 disabled: this.object.mfa_force_enabled
}, },
callbacks: { callbacks: {
click: function() { click: function() {
if (this.object.mfa_enabled) { window.location.href = `/core/auth/profile/mfa/`
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)
} }
}, },
{ {