90
90
<template #footer >
91
91
<div >
92
92
<el-button @click =" closeDrawer" >{{ $t('common.cancel') }}</el-button >
93
- <el-button type =" primary" @click =" submit" :disabled =" loading"
94
- > {{ $t('common.save') }}
93
+ <el-button type =" primary" @click =" submit" :disabled =" loading" >
94
+ {{ $t('common.save') }}
95
95
</el-button >
96
96
</div >
97
97
</template >
@@ -107,11 +107,13 @@ import { MsgError, MsgSuccess } from '@/utils/message'
107
107
import { copyClick } from ' @/utils/clipboard'
108
108
import { t } from ' @/locales'
109
109
110
+ type PlatformType = ' wechat' | ' dingtalk' | ' wecom' | ' feishu' | ' slack'
111
+
110
112
const formRef = ref <FormInstance >()
111
113
const visible = ref (false )
112
114
const loading = ref (false )
113
115
const dataLoaded = ref (false )
114
- const configType = ref <' wechat ' | ' dingtalk ' | ' wecom ' | ' feishu ' >(' wechat' )
116
+ const configType = ref <PlatformType >(' wechat' )
115
117
const route = useRoute ()
116
118
const emit = defineEmits ([' refresh' ])
117
119
const {
@@ -137,7 +139,7 @@ const form = reactive<any>({
137
139
callback_url: ' '
138
140
},
139
141
feishu: { app_id: ' ' , app_secret: ' ' , verification_token: ' ' , callback_url: ' ' },
140
- slack: { signing_secret: ' ' , bot_user_token: ' ' , callback_url: ' ' }
142
+ slack: { signing_secret: ' ' , bot_user_token: ' ' , callback_url: ' ' }
141
143
})
142
144
143
145
const rules = reactive <{ [propName : string ]: any }>({
@@ -306,16 +308,23 @@ const configFields: { [propName: string]: { [propName: string]: any } } = {
306
308
}
307
309
}
308
310
309
- const passwordFields = new Set ([' app_secret' , ' client_secret' , ' secret' ])
311
+ const passwordFields = new Set ([
312
+ ' app_secret' ,
313
+ ' client_secret' ,
314
+ ' secret' ,
315
+ ' bot_user_token' ,
316
+ ' signing_secret'
317
+ ])
310
318
311
319
const drawerTitle = computed (
312
320
() =>
313
321
({
314
322
wechat: t (' views.application.applicationAccess.wechatSetting.title' ),
315
323
dingtalk: t (' views.application.applicationAccess.dingtalkSetting.title' ),
316
324
wecom: t (' views.application.applicationAccess.wecomSetting.title' ),
317
- feishu: t (' views.application.applicationAccess.larkSetting.title' )
318
- })[configType .value ]
325
+ feishu: t (' views.application.applicationAccess.larkSetting.title' ),
326
+ slack: t (' views.application.applicationAccess.slackSetting.title' )
327
+ }[configType .value ])
319
328
)
320
329
321
330
const infoTitle = computed (
@@ -324,8 +333,9 @@ const infoTitle = computed(
324
333
wechat: t (' views.applicationOverview.appInfo.header' ),
325
334
dingtalk: t (' views.applicationOverview.appInfo.header' ),
326
335
wecom: t (' views.applicationOverview.appInfo.header' ),
327
- feishu: t (' views.applicationOverview.appInfo.header' )
328
- })[configType .value ]
336
+ feishu: t (' views.applicationOverview.appInfo.header' ),
337
+ slack: t (' views.applicationOverview.appInfo.header' )
338
+ }[configType .value ])
329
339
)
330
340
331
341
const passwordVisible = reactive <Record <string , boolean >>(
@@ -366,7 +376,7 @@ const submit = async () => {
366
376
})
367
377
}
368
378
369
- const open = async (id : string , type : ' wechat ' | ' dingtalk ' | ' wecom ' | ' feishu ' ) => {
379
+ const open = async (id : string , type : PlatformType ) => {
370
380
visible .value = true
371
381
configType .value = type
372
382
loading .value = true
@@ -388,5 +398,3 @@ const open = async (id: string, type: 'wechat' | 'dingtalk' | 'wecom' | 'feishu'
388
398
389
399
defineExpose ({ open })
390
400
</script >
391
-
392
- <style lang="scss"></style >
0 commit comments