v0.3.31: 全局配置保留title/content仅移除level/priority;推送用户SMTP只显示收件人
This commit is contained in:
@@ -567,9 +567,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<!-- Channel params inputs -->
|
||||
<!-- Channel params inputs (filtered: no title/content/level/priority; SMTP only shows to) -->
|
||||
<template v-if="pushUserForm.channel && notifyProviders[pushUserForm.channel]">
|
||||
<div v-for="p in notifyProviders[pushUserForm.channel].params" :key="p.key" style="display:inline-flex; align-items:center; gap:4px;">
|
||||
<div v-for="p in getPushUserChannelParams(pushUserForm.channel)" :key="p.key" style="display:inline-flex; align-items:center; gap:4px;">
|
||||
<span style="font-size:13px; color:var(--el-text-color-secondary); white-space:nowrap;">{{ p.label }}:</span>
|
||||
<el-input
|
||||
v-if="p.type === 'password'"
|
||||
@@ -1080,6 +1080,18 @@ function getEnabledChannels(row: any): Record<string, any> {
|
||||
return ch
|
||||
}
|
||||
|
||||
// Filter params for push user form: exclude title/content/level/priority; SMTP only shows 'to'
|
||||
function getPushUserChannelParams(channelKey: string): any[] {
|
||||
const np = notifyProviders.value[channelKey]
|
||||
if (!np || !np.params) return []
|
||||
const exclude = ['title', 'content', 'level', 'priority']
|
||||
return np.params.filter((p: any) => {
|
||||
if (exclude.includes(p.key)) return false
|
||||
// SMTP: only show 'to' (email recipient)
|
||||
if (channelKey === 'smtp' && p.key !== 'to') return false
|
||||
return true
|
||||
})
|
||||
}
|
||||
function getProviderLabel(key: string): string {
|
||||
return notifyProviders.value[key]?.label || key
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user