mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 16:56:40 +08:00
通知渠道增加Discord
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -49,6 +49,7 @@ const notificationTypeNames: { [key: string]: string } = {
|
|||||||
vocechat: t('notification.vocechat.name'),
|
vocechat: t('notification.vocechat.name'),
|
||||||
synologychat: t('notification.synologychat.name'),
|
synologychat: t('notification.synologychat.name'),
|
||||||
slack: t('notification.slack.name'),
|
slack: t('notification.slack.name'),
|
||||||
|
discord: t('notification.discord.name'),
|
||||||
webpush: t('notification.webpush.name'),
|
webpush: t('notification.webpush.name'),
|
||||||
custom: t('setting.notification.custom'),
|
custom: t('setting.notification.custom'),
|
||||||
}
|
}
|
||||||
@@ -102,6 +103,8 @@ const getIcon = computed(() => {
|
|||||||
return getLogoUrl('synologychat')
|
return getLogoUrl('synologychat')
|
||||||
case 'slack':
|
case 'slack':
|
||||||
return getLogoUrl('slack')
|
return getLogoUrl('slack')
|
||||||
|
case 'discord':
|
||||||
|
return getLogoUrl('discord')
|
||||||
case 'webpush':
|
case 'webpush':
|
||||||
return getLogoUrl('chrome')
|
return getLogoUrl('chrome')
|
||||||
default:
|
default:
|
||||||
@@ -350,6 +353,47 @@ function onClose() {
|
|||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
|
<VRow v-else-if="notificationInfo.type == 'discord'">
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="notificationInfo.name"
|
||||||
|
:label="t('notification.name')"
|
||||||
|
:placeholder="t('notification.name')"
|
||||||
|
:hint="t('notification.nameHint')"
|
||||||
|
persistent-hint
|
||||||
|
prepend-inner-icon="mdi-label"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="notificationInfo.config.DISCORD_WEBHOOK_URL"
|
||||||
|
:label="t('notification.discord.webhookUrl')"
|
||||||
|
:hint="t('notification.discord.webhookUrlHint')"
|
||||||
|
persistent-hint
|
||||||
|
prepend-inner-icon="mdi-webhook"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="notificationInfo.config.DISCORD_USERNAME"
|
||||||
|
:label="t('notification.discord.username')"
|
||||||
|
:placeholder="t('notification.discord.usernamePlaceholder')"
|
||||||
|
:hint="t('notification.discord.usernameHint')"
|
||||||
|
persistent-hint
|
||||||
|
prepend-inner-icon="mdi-account"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="notificationInfo.config.DISCORD_AVATAR_URL"
|
||||||
|
:label="t('notification.discord.avatarUrl')"
|
||||||
|
:placeholder="t('notification.discord.avatarUrlPlaceholder')"
|
||||||
|
:hint="t('notification.discord.avatarUrlHint')"
|
||||||
|
persistent-hint
|
||||||
|
prepend-inner-icon="mdi-image-outline"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
</VRow>
|
||||||
<VRow v-else-if="notificationInfo.type == 'synologychat'">
|
<VRow v-else-if="notificationInfo.type == 'synologychat'">
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
|
|||||||
@@ -458,6 +458,18 @@ export default {
|
|||||||
channelHint: 'Channel to send messages, default is "all"',
|
channelHint: 'Channel to send messages, default is "all"',
|
||||||
channelRequired: 'Channel Name cannot be empty',
|
channelRequired: 'Channel Name cannot be empty',
|
||||||
},
|
},
|
||||||
|
discord: {
|
||||||
|
name: 'Discord',
|
||||||
|
webhookUrl: 'Webhook URL',
|
||||||
|
webhookUrlHint: 'Discord Webhook URL, format: https://discord.com/api/webhooks/...',
|
||||||
|
webhookUrlRequired: 'Webhook URL is required',
|
||||||
|
username: 'Username',
|
||||||
|
usernameHint: 'Custom username for webhook messages (optional)',
|
||||||
|
usernamePlaceholder: 'MoviePilot',
|
||||||
|
avatarUrl: 'Avatar URL',
|
||||||
|
avatarUrlHint: 'Custom avatar image URL (optional)',
|
||||||
|
avatarUrlPlaceholder: 'https://example.com/avatar.png',
|
||||||
|
},
|
||||||
synologychat: {
|
synologychat: {
|
||||||
name: 'Synology Chat',
|
name: 'Synology Chat',
|
||||||
webhook: 'Webhook URL',
|
webhook: 'Webhook URL',
|
||||||
|
|||||||
@@ -456,6 +456,18 @@ export default {
|
|||||||
channelHint: '消息发送频道,默认`全体`',
|
channelHint: '消息发送频道,默认`全体`',
|
||||||
channelRequired: '频道名称不能为空',
|
channelRequired: '频道名称不能为空',
|
||||||
},
|
},
|
||||||
|
discord: {
|
||||||
|
name: 'Discord',
|
||||||
|
webhookUrl: 'Webhook URL',
|
||||||
|
webhookUrlHint: 'Discord Webhook URL,格式:https://discord.com/api/webhooks/...',
|
||||||
|
webhookUrlRequired: 'Webhook URL不能为空',
|
||||||
|
username: '用户名',
|
||||||
|
usernameHint: '自定义消息显示的用户名(可选)',
|
||||||
|
usernamePlaceholder: 'MoviePilot',
|
||||||
|
avatarUrl: '头像URL',
|
||||||
|
avatarUrlHint: '自定义头像图片URL(可选)',
|
||||||
|
avatarUrlPlaceholder: 'https://example.com/avatar.png',
|
||||||
|
},
|
||||||
synologychat: {
|
synologychat: {
|
||||||
name: 'Synology Chat',
|
name: 'Synology Chat',
|
||||||
webhook: '机器人传入URL',
|
webhook: '机器人传入URL',
|
||||||
|
|||||||
@@ -447,6 +447,18 @@ export default {
|
|||||||
channel: '頻道名稱',
|
channel: '頻道名稱',
|
||||||
channelHint: '消息發送頻道,默認`全體`',
|
channelHint: '消息發送頻道,默認`全體`',
|
||||||
},
|
},
|
||||||
|
discord: {
|
||||||
|
name: 'Discord',
|
||||||
|
webhookUrl: 'Webhook URL',
|
||||||
|
webhookUrlHint: 'Discord Webhook URL,格式:https://discord.com/api/webhooks/...',
|
||||||
|
webhookUrlRequired: 'Webhook URL不能為空',
|
||||||
|
username: '用戶名',
|
||||||
|
usernameHint: '自定義消息顯示的用戶名(可選)',
|
||||||
|
usernamePlaceholder: 'MoviePilot',
|
||||||
|
avatarUrl: '頭像URL',
|
||||||
|
avatarUrlHint: '自定義頭像圖片URL(可選)',
|
||||||
|
avatarUrlPlaceholder: 'https://example.com/avatar.png',
|
||||||
|
},
|
||||||
synologychat: {
|
synologychat: {
|
||||||
name: 'Synology Chat',
|
name: 'Synology Chat',
|
||||||
webhook: '機器人傳入URL',
|
webhook: '機器人傳入URL',
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import trimemediaLogo from '@/assets/images/logos/trimemedia.png'
|
|||||||
import wechatLogo from '@/assets/images/logos/wechat.png'
|
import wechatLogo from '@/assets/images/logos/wechat.png'
|
||||||
import telegramLogo from '@/assets/images/logos/telegram.webp'
|
import telegramLogo from '@/assets/images/logos/telegram.webp'
|
||||||
import slackLogo from '@/assets/images/logos/slack.webp'
|
import slackLogo from '@/assets/images/logos/slack.webp'
|
||||||
|
import discordLogo from '@/assets/images/logos/discord.png'
|
||||||
import synologychatLogo from '@/assets/images/logos/synologychat.png'
|
import synologychatLogo from '@/assets/images/logos/synologychat.png'
|
||||||
import vocechatLogo from '@/assets/images/logos/vocechat.png'
|
import vocechatLogo from '@/assets/images/logos/vocechat.png'
|
||||||
import downloaderLogo from '@/assets/images/logos/downloader.png'
|
import downloaderLogo from '@/assets/images/logos/downloader.png'
|
||||||
@@ -40,6 +41,7 @@ const logoMap: Record<string, string> = {
|
|||||||
wechat: wechatLogo,
|
wechat: wechatLogo,
|
||||||
telegram: telegramLogo,
|
telegram: telegramLogo,
|
||||||
slack: slackLogo,
|
slack: slackLogo,
|
||||||
|
discord: discordLogo,
|
||||||
synologychat: synologychatLogo,
|
synologychat: synologychatLogo,
|
||||||
vocechat: vocechatLogo,
|
vocechat: vocechatLogo,
|
||||||
downloader: downloaderLogo,
|
downloader: downloaderLogo,
|
||||||
|
|||||||
@@ -294,6 +294,9 @@ onMounted(() => {
|
|||||||
<VListItem @click="addNotification('slack')">
|
<VListItem @click="addNotification('slack')">
|
||||||
<VListItemTitle>{{ t('setting.notification.slack') }}</VListItemTitle>
|
<VListItemTitle>{{ t('setting.notification.slack') }}</VListItemTitle>
|
||||||
</VListItem>
|
</VListItem>
|
||||||
|
<VListItem @click="addNotification('discord')">
|
||||||
|
<VListItemTitle>Discord</VListItemTitle>
|
||||||
|
</VListItem>
|
||||||
<VListItem @click="addNotification('synologychat')">
|
<VListItem @click="addNotification('synologychat')">
|
||||||
<VListItemTitle>{{ t('setting.notification.synologyChat') }}</VListItemTitle>
|
<VListItemTitle>{{ t('setting.notification.synologyChat') }}</VListItemTitle>
|
||||||
</VListItem>
|
</VListItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user