Merge branch 'main' into main

This commit is contained in:
Yoan.liu
2025-04-13 08:24:16 +08:00
committed by GitHub
78 changed files with 2210 additions and 106 deletions

View File

@@ -45,6 +45,7 @@ export const NOTIFY_CHANNELS = Object.freeze({
GOTIFY: "gotify",
LARK: "lark",
MATTERMOST: "mattermost",
PUSHOVER: "pushover",
PUSHPLUS: "pushplus",
SERVERCHAN: "serverchan",
TELEGRAM: "telegram",
@@ -66,6 +67,7 @@ export type NotifyChannelsSettingsContent = {
[NOTIFY_CHANNELS.GOTIFY]?: GotifyNotifyChannelConfig;
[NOTIFY_CHANNELS.LARK]?: LarkNotifyChannelConfig;
[NOTIFY_CHANNELS.MATTERMOST]?: MattermostNotifyChannelConfig;
[NOTIFY_CHANNELS.PUSHOVER]?: PushoverNotifyChannelConfig;
[NOTIFY_CHANNELS.PUSHPLUS]?: PushPlusNotifyChannelConfig;
[NOTIFY_CHANNELS.SERVERCHAN]?: ServerChanNotifyChannelConfig;
[NOTIFY_CHANNELS.TELEGRAM]?: TelegramNotifyChannelConfig;
@@ -116,6 +118,12 @@ export type MattermostNotifyChannelConfig = {
enabled?: boolean;
}
export type PushoverNotifyChannelConfig = {
token: string;
user: string;
enabled?: boolean;
};
export type PushPlusNotifyChannelConfig = {
token: string;
enabled?: boolean;
@@ -154,6 +162,7 @@ export const notifyChannelsMap: Map<NotifyChannel["type"], NotifyChannel> = new
[NOTIFY_CHANNELS.GOTIFY, "common.notifier.gotify"],
[NOTIFY_CHANNELS.LARK, "common.notifier.lark"],
[NOTIFY_CHANNELS.MATTERMOST, "common.notifier.mattermost"],
[NOTIFY_CHANNELS.PUSHOVER, "common.notifier.pushover"],
[NOTIFY_CHANNELS.PUSHPLUS, "common.notifier.pushplus"],
[NOTIFY_CHANNELS.WECOM, "common.notifier.wecom"],
[NOTIFY_CHANNELS.TELEGRAM, "common.notifier.telegram"],