Skip to content

Commit

Permalink
perf: Support WeCom DingTalk FeiShu Lark Slack attribute mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
feng626 committed Jul 30, 2024
1 parent 6dee911 commit 7c41d14
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/views/settings/Auth/DingTalk.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

<script>
import BaseAuth from './Base'
import { UpdateToken } from '@/components/Form/FormFields'
import { JsonEditor, UpdateToken } from '@/components/Form/FormFields'
import { JsonRequiredUserNameMapped } from '@/components/Form/DataForm/rules'
export default {
name: 'DingTalk',
Expand Down Expand Up @@ -40,11 +41,16 @@ export default {
encryptedFields: ['DINGTALK_APPSECRET'],
fields: [
'AUTH_DINGTALK', 'DINGTALK_AGENTID',
'DINGTALK_APPKEY', 'DINGTALK_APPSECRET'
'DINGTALK_APPKEY', 'DINGTALK_APPSECRET',
'DINGTALK_RENAME_ATTRIBUTES'
],
fieldsMeta: {
DINGTALK_APPSECRET: {
component: UpdateToken
},
DINGTALK_RENAME_ATTRIBUTES: {
component: JsonEditor,
rules: [JsonRequiredUserNameMapped]
}
},
hasDetailInMsg: false,
Expand Down
10 changes: 8 additions & 2 deletions src/views/settings/Auth/Slack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

<script>
import BaseAuth from './Base'
import { UpdateToken } from '@/components/Form/FormFields'
import { JsonEditor, UpdateToken } from '@/components/Form/FormFields'
import { JsonRequiredUserNameMapped } from '@/components/Form/DataForm/rules'
export default {
name: 'Slack',
Expand Down Expand Up @@ -41,14 +42,19 @@ export default {
],
encryptedFields: ['SLACK_SECRET'],
fields: [
'AUTH_SLACK', 'SLACK_CLIENT_ID', 'SLACK_CLIENT_SECRET', 'SLACK_BOT_TOKEN'
'AUTH_SLACK', 'SLACK_CLIENT_ID', 'SLACK_CLIENT_SECRET',
'SLACK_BOT_TOKEN', 'SLACK_RENAME_ATTRIBUTES'
],
fieldsMeta: {
SLACK_APP_SECRET: {
component: UpdateToken
},
SLACK_BOT_TOKEN: {
component: UpdateToken
},
SLACK_RENAME_ATTRIBUTES: {
component: JsonEditor,
rules: [JsonRequiredUserNameMapped]
}
},
// 不清理的话,编辑secret,在删除提交会报错
Expand Down
10 changes: 8 additions & 2 deletions src/views/settings/Auth/WeCom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

<script>
import BaseAuth from './Base'
import { UpdateToken } from '@/components/Form/FormFields'
import { JsonEditor, UpdateToken } from '@/components/Form/FormFields'
import { JsonRequiredUserNameMapped } from '@/components/Form/DataForm/rules'
export default {
name: 'WeCom',
Expand Down Expand Up @@ -40,11 +41,16 @@ export default {
],
encryptedFields: ['WECOM_SECRET'],
fields: [
'AUTH_WECOM', 'WECOM_CORPID', 'WECOM_AGENTID', 'WECOM_SECRET'
'AUTH_WECOM', 'WECOM_CORPID', 'WECOM_AGENTID',
'WECOM_SECRET', 'WECOM_RENAME_ATTRIBUTES'
],
fieldsMeta: {
WECOM_SECRET: {
component: UpdateToken
},
WECOM_RENAME_ATTRIBUTES: {
component: JsonEditor,
rules: [JsonRequiredUserNameMapped]
}
},
// 不清理的话,编辑secret,在删除提交会报错
Expand Down

0 comments on commit 7c41d14

Please sign in to comment.