mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat(ui): add Slack app integration for MaxKB app
This commit is contained in:
parent
33c07fdd33
commit
097a24fbbd
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 128 128"><path fill="#de1c59" d="M27.255 80.719c0 7.33-5.978 13.317-13.309 13.317S.63 88.049.63 80.719s5.987-13.317 13.317-13.317h13.309zm6.709 0c0-7.33 5.987-13.317 13.317-13.317s13.317 5.986 13.317 13.317v33.335c0 7.33-5.986 13.317-13.317 13.317c-7.33 0-13.317-5.987-13.317-13.317zm0 0"/><path fill="#35c5f0" d="M47.281 27.255c-7.33 0-13.317-5.978-13.317-13.309S39.951.63 47.281.63s13.317 5.987 13.317 13.317v13.309zm0 6.709c7.33 0 13.317 5.987 13.317 13.317s-5.986 13.317-13.317 13.317H13.946C6.616 60.598.63 54.612.63 47.281c0-7.33 5.987-13.317 13.317-13.317zm0 0"/><path fill="#2eb57d" d="M100.745 47.281c0-7.33 5.978-13.317 13.309-13.317s13.317 5.987 13.317 13.317s-5.987 13.317-13.317 13.317h-13.309zm-6.709 0c0 7.33-5.987 13.317-13.317 13.317s-13.317-5.986-13.317-13.317V13.946C67.402 6.616 73.388.63 80.719.63c7.33 0 13.317 5.987 13.317 13.317zm0 0"/><path fill="#ebb02e" d="M80.719 100.745c7.33 0 13.317 5.978 13.317 13.309s-5.987 13.317-13.317 13.317s-13.317-5.987-13.317-13.317v-13.309zm0-6.709c-7.33 0-13.317-5.987-13.317-13.317s5.986-13.317 13.317-13.317h33.335c7.33 0 13.317 5.986 13.317 13.317c0 7.33-5.987 13.317-13.317 13.317zm0 0"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -166,6 +166,8 @@ export default {
|
|||
wechatPlatform: 'WeChat Open Platform',
|
||||
dingtalkPlatform: 'DingTalk Open Platform',
|
||||
larkPlatform: 'Lark Open Platform',
|
||||
slack: 'Slack',
|
||||
slackTip: 'Create Slack intelligent APP',
|
||||
wecomSetting: {
|
||||
title: 'WeCom Configuration',
|
||||
cropId: 'Crop ID',
|
||||
|
|
@ -206,6 +208,11 @@ export default {
|
|||
urlInfo:
|
||||
'-Events and callbacks - event configuration - configure the "request address" of the subscription method'
|
||||
},
|
||||
slackSetting: {
|
||||
title: 'Slack Configuration',
|
||||
signingSecretPlaceholder: 'Please enter signing secret',
|
||||
botUserTokenPlaceholder: 'Please enter bot user token',
|
||||
},
|
||||
copyUrl: 'Copy the link and fill it in'
|
||||
},
|
||||
hitTest: {
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@ export default {
|
|||
wechatTip: '打造公众号智能应用',
|
||||
lark: '飞书应用',
|
||||
larkTip: '打造飞书智能应用',
|
||||
slack: 'Slack',
|
||||
slackTip: '打造 Slack 智能应用',
|
||||
setting: '配置',
|
||||
callback: '回调地址',
|
||||
callbackTip: '请输入回调地址',
|
||||
|
|
@ -193,7 +195,11 @@ export default {
|
|||
verificationTokenPlaceholder: '请输入Verification Token',
|
||||
urlInfo: '-事件与回调-事件配置-配置订阅方式的 "请求地址" 中'
|
||||
},
|
||||
|
||||
slackSetting: {
|
||||
title: 'Slack 应用配置',
|
||||
signingSecretPlaceholder: '请输入 Signing Secret',
|
||||
botUserTokenPlaceholder: '请输入 Bot User Token',
|
||||
},
|
||||
copyUrl: '复制链接填入到'
|
||||
},
|
||||
hitTest: {
|
||||
|
|
|
|||
|
|
@ -149,6 +149,8 @@ export default {
|
|||
wechatTip: '打造公眾號智慧應用',
|
||||
lark: '飛書應用',
|
||||
larkTip: '打造飛書智慧應用',
|
||||
slack: 'Slack',
|
||||
slackTip: '打造 Slack 智慧應用',
|
||||
setting: '配置',
|
||||
callback: '回呼位址',
|
||||
callbackTip: '請輸入回呼位址',
|
||||
|
|
@ -192,6 +194,11 @@ export default {
|
|||
verificationTokenPlaceholder: '請輸入Verification Token',
|
||||
urlInfo: '-事件與回呼-事件配置-配置訂閱方式的 "請求位址" 中'
|
||||
},
|
||||
slackSetting: {
|
||||
title: 'Slack 應用配置',
|
||||
signingSecretPlaceholder: '請輸入 Signing Secret',
|
||||
botUserTokenPlaceholder: '請輸入 Bot User Token',
|
||||
},
|
||||
copyUrl: '複製連結填入到'
|
||||
},
|
||||
hitTest: {
|
||||
|
|
|
|||
|
|
@ -83,6 +83,14 @@ const platforms = reactive([
|
|||
description: t('views.application.applicationAccess.larkTip'),
|
||||
isActive: false,
|
||||
exists: false
|
||||
},
|
||||
{
|
||||
key: 'slack',
|
||||
logoSrc: new URL(`../../assets/logo_slack.svg`, import.meta.url).href,
|
||||
name: t('views.application.applicationAccess.slack'),
|
||||
description: t('views.application.applicationAccess.slackTip'),
|
||||
isActive: false,
|
||||
exists: false
|
||||
}
|
||||
])
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,8 @@ const form = reactive<any>({
|
|||
encoding_aes_key: '',
|
||||
callback_url: ''
|
||||
},
|
||||
feishu: { app_id: '', app_secret: '', verification_token: '', callback_url: '' }
|
||||
feishu: { app_id: '', app_secret: '', verification_token: '', callback_url: '' },
|
||||
slack: { signing_secret: '', bot_user_token: '', callback_url: '' }
|
||||
})
|
||||
|
||||
const rules = reactive<{ [propName: string]: any }>({
|
||||
|
|
@ -245,6 +246,22 @@ const rules = reactive<{ [propName: string]: any }>({
|
|||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
slack: {
|
||||
signing_secret: [
|
||||
{
|
||||
required: true,
|
||||
message: t('views.application.applicationAccess.slackSetting.signingSecretPlaceholder'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
bot_user_token: [
|
||||
{
|
||||
required: true,
|
||||
message: t('views.application.applicationAccess.slackSetting.botUserTokenPlaceholder'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -282,6 +299,10 @@ const configFields: { [propName: string]: { [propName: string]: any } } = {
|
|||
app_id: { label: 'App ID', placeholder: '' },
|
||||
app_secret: { label: 'App Secret', placeholder: '' },
|
||||
verification_token: { label: 'Verification Token', placeholder: '' }
|
||||
},
|
||||
slack: {
|
||||
signing_secret: { label: 'Signing Secret', placeholder: '' },
|
||||
bot_user_token: { label: 'Bot User Token', placeholder: '' }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue