diff --git a/src/components/QuickActions/action.vue b/src/components/QuickActions/action.vue
index 86b24d9ad..d9a0afed7 100644
--- a/src/components/QuickActions/action.vue
+++ b/src/components/QuickActions/action.vue
@@ -2,16 +2,23 @@
| {{ action.title }}: |
-
-
- {{ label }}
-
-
+
+
+
+ {{ label }}
+
+
+
|
diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json
index 5e73fd09f..8423c7eae 100644
--- a/src/i18n/langs/en.json
+++ b/src/i18n/langs/en.json
@@ -1733,6 +1733,7 @@
"UpdateNodeAssetHardwareInfo": "Update node asset hardware information"
},
"users": {
+ "UnbindHelpText": "The user is not a local user and cannot be unbound. Contact the administrator",
"SetStatus": "Set status",
"Set": "Set",
"NotSet": "Not set",
diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json
index 951a4504f..05b8eed52 100644
--- a/src/i18n/langs/ja.json
+++ b/src/i18n/langs/ja.json
@@ -1725,6 +1725,7 @@
"UpdateNodeAssetHardwareInfo": "ノード資産ハードウェア情報の更新"
},
"users": {
+ "UnbindHelpText": "このユーザーはローカルユーザーではありませんので、解除できません。管理者に連絡してください。",
"SetStatus": "ステータスの設定",
"Set": "設定",
"NotSet": "未設定",
diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json
index 8ed068b09..d560e569f 100644
--- a/src/i18n/langs/zh.json
+++ b/src/i18n/langs/zh.json
@@ -1720,6 +1720,7 @@
"UpdateNodeAssetHardwareInfo": "更新节点资产硬件信息"
},
"users": {
+ "UnbindHelpText": "此用户非本地用户,无法进行解绑,请联系管理员",
"SetStatus": "设置状态",
"Set": "已设置",
"NotSet": "未设置",
diff --git a/src/views/profile/ProfileInfo.vue b/src/views/profile/ProfileInfo.vue
index 245ad6f2f..d33f04eab 100644
--- a/src/views/profile/ProfileInfo.vue
+++ b/src/views/profile/ProfileInfo.vue
@@ -63,7 +63,10 @@ export default {
title: this.$t('users.setWeCom'),
attrs: {
type: 'primary',
- label: this.$store.state.users.profile.wecom_id ? this.$t('common.unbind') : this.$t('common.bind')
+ label: this.$store.state.users.profile.wecom_id ? this.$t('common.unbind') : this.$t('common.bind'),
+ disabled: this.isComponentDisabled('wecom_id'),
+ showTip: this.isComponentDisabled('wecom_id'),
+ tip: this.$t('users.UnbindHelpText')
},
has: this.$store.getters.publicSettings.AUTH_WECOM,
callbacks: {
@@ -77,7 +80,10 @@ export default {
title: this.$t('users.setDingTalk'),
attrs: {
type: 'primary',
- label: this.$store.state.users.profile.dingtalk_id ? this.$t('common.unbind') : this.$t('common.bind')
+ label: this.$store.state.users.profile.dingtalk_id ? this.$t('common.unbind') : this.$t('common.bind'),
+ disabled: this.isComponentDisabled('dingtalk_id'),
+ showTip: this.isComponentDisabled('dingtalk_id'),
+ tip: this.$t('users.UnbindHelpText')
},
has: this.$store.getters.publicSettings.AUTH_DINGTALK,
callbacks: {
@@ -91,7 +97,10 @@ export default {
title: this.$t('users.setFeiShu'),
attrs: {
type: 'primary',
- label: this.$store.state.users.profile.feishu_id ? this.$t('common.unbind') : this.$t('common.bind')
+ label: this.$store.state.users.profile.feishu_id ? this.$t('common.unbind') : this.$t('common.bind'),
+ disabled: this.isComponentDisabled('feishu_id'),
+ showTip: this.isComponentDisabled('feishu_id'),
+ tip: this.$t('users.UnbindHelpText')
},
has: this.$store.getters.publicSettings.AUTH_FEISHU,
callbacks: {
@@ -300,6 +309,9 @@ export default {
}
},
methods: {
+ isComponentDisabled(source) {
+ return !!this.$store.state.users.profile[source] && this.$store.state.users.profile.source.value !== 'local'
+ },
updateUserReceiveBackends(val) {
this.$axios.patch(
`/api/v1/notifications/user-msg-subscription/${this.object.id}/`,