mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
Merge pull request #411 from HankunYu/v2
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_BOT_TOKEN"
|
||||||
|
:label="t('notification.discord.botToken')"
|
||||||
|
:hint="t('notification.discord.botTokenHint')"
|
||||||
|
persistent-hint
|
||||||
|
prepend-inner-icon="mdi-key-variant"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="notificationInfo.config.DISCORD_GUILD_ID"
|
||||||
|
:label="t('notification.discord.guildId')"
|
||||||
|
:placeholder="t('notification.discord.guildIdPlaceholder')"
|
||||||
|
:hint="t('notification.discord.guildIdHint')"
|
||||||
|
persistent-hint
|
||||||
|
prepend-inner-icon="mdi-pound"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
<VCol cols="12" md="6">
|
||||||
|
<VTextField
|
||||||
|
v-model="notificationInfo.config.DISCORD_CHANNEL_ID"
|
||||||
|
:label="t('notification.discord.channelId')"
|
||||||
|
:placeholder="t('notification.discord.channelIdPlaceholder')"
|
||||||
|
:hint="t('notification.discord.channelIdHint')"
|
||||||
|
persistent-hint
|
||||||
|
prepend-inner-icon="mdi-pound-box"
|
||||||
|
/>
|
||||||
|
</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',
|
||||||
|
botToken: 'Bot Token',
|
||||||
|
botTokenHint: 'Discord Bot Token (enable Message Content Intent in Dev Portal)',
|
||||||
|
botTokenRequired: 'Bot Token is required',
|
||||||
|
guildId: 'Guild ID',
|
||||||
|
guildIdHint: 'Optional, restrict to a specific guild; leave blank to use any joined guild',
|
||||||
|
guildIdPlaceholder: '123456789012345678',
|
||||||
|
channelId: 'Channel ID',
|
||||||
|
channelIdHint: 'Optional, default broadcast channel; leave blank to auto-pick a writable channel',
|
||||||
|
channelIdPlaceholder: '123456789012345678',
|
||||||
|
},
|
||||||
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',
|
||||||
|
botToken: 'Bot Token',
|
||||||
|
botTokenHint: 'Discord Bot Token(需在开发者后台开启 Message Content Intent)',
|
||||||
|
botTokenRequired: 'Bot Token不能为空',
|
||||||
|
guildId: '服务器 ID',
|
||||||
|
guildIdHint: '可选,限制使用的服务器;为空则使用已加入的任意服务器',
|
||||||
|
guildIdPlaceholder: '123456789012345678',
|
||||||
|
channelId: '频道 ID',
|
||||||
|
channelIdHint: '可选,默认广播频道;为空则自动选择可发送消息的频道',
|
||||||
|
channelIdPlaceholder: '123456789012345678',
|
||||||
|
},
|
||||||
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',
|
||||||
|
botToken: 'Bot Token',
|
||||||
|
botTokenHint: 'Discord Bot Token(需在開發者後台開啟 Message Content Intent)',
|
||||||
|
botTokenRequired: 'Bot Token不能為空',
|
||||||
|
guildId: '伺服器 ID',
|
||||||
|
guildIdHint: '可選,限制使用的伺服器;空白則使用已加入的任意伺服器',
|
||||||
|
guildIdPlaceholder: '123456789012345678',
|
||||||
|
channelId: '頻道 ID',
|
||||||
|
channelIdHint: '可選,預設廣播頻道;空白則自動選擇可發送消息的頻道',
|
||||||
|
channelIdPlaceholder: '123456789012345678',
|
||||||
|
},
|
||||||
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