Skip to content

Commit fbca792

Browse files
guqingwangdan-fit2cloud
authored andcommitted
fix: drawer title for slack setting
1 parent 3d7a9fc commit fbca792

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

Diff for: ui/src/views/application/component/AccessSettingDrawer.vue

+20-12
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
<template #footer>
9191
<div>
9292
<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') }}
9595
</el-button>
9696
</div>
9797
</template>
@@ -107,11 +107,13 @@ import { MsgError, MsgSuccess } from '@/utils/message'
107107
import { copyClick } from '@/utils/clipboard'
108108
import { t } from '@/locales'
109109
110+
type PlatformType = 'wechat' | 'dingtalk' | 'wecom' | 'feishu' | 'slack'
111+
110112
const formRef = ref<FormInstance>()
111113
const visible = ref(false)
112114
const loading = ref(false)
113115
const dataLoaded = ref(false)
114-
const configType = ref<'wechat' | 'dingtalk' | 'wecom' | 'feishu'>('wechat')
116+
const configType = ref<PlatformType>('wechat')
115117
const route = useRoute()
116118
const emit = defineEmits(['refresh'])
117119
const {
@@ -137,7 +139,7 @@ const form = reactive<any>({
137139
callback_url: ''
138140
},
139141
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: '' }
141143
})
142144
143145
const rules = reactive<{ [propName: string]: any }>({
@@ -306,16 +308,23 @@ const configFields: { [propName: string]: { [propName: string]: any } } = {
306308
}
307309
}
308310
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+
])
310318
311319
const drawerTitle = computed(
312320
() =>
313321
({
314322
wechat: t('views.application.applicationAccess.wechatSetting.title'),
315323
dingtalk: t('views.application.applicationAccess.dingtalkSetting.title'),
316324
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])
319328
)
320329
321330
const infoTitle = computed(
@@ -324,8 +333,9 @@ const infoTitle = computed(
324333
wechat: t('views.applicationOverview.appInfo.header'),
325334
dingtalk: t('views.applicationOverview.appInfo.header'),
326335
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])
329339
)
330340
331341
const passwordVisible = reactive<Record<string, boolean>>(
@@ -366,7 +376,7 @@ const submit = async () => {
366376
})
367377
}
368378
369-
const open = async (id: string, type: 'wechat' | 'dingtalk' | 'wecom' | 'feishu') => {
379+
const open = async (id: string, type: PlatformType) => {
370380
visible.value = true
371381
configType.value = type
372382
loading.value = true
@@ -388,5 +398,3 @@ const open = async (id: string, type: 'wechat' | 'dingtalk' | 'wecom' | 'feishu'
388398
389399
defineExpose({ open })
390400
</script>
391-
392-
<style lang="scss"></style>

0 commit comments

Comments
 (0)