feat: default to all modes, switch mode filter from whitelist to excludedModes blacklist

- NotifyConfig.modes (whitelist) → excludedModes (blacklist, default [] = push everywhere)
- valid modes are tui/json/rpc/print (pi ExtensionMode); invalid entries ignored with warning
- legacy "modes" key is ignored with a deprecation warning
- /ntfy status shows 模式: 全部(排除: json)
- migrate local config: modes array → excludedModes: []
This commit is contained in:
杨豪
2026-10-08 14:16:48 +08:00
parent 7164408d74
commit 6fc9f228a8
6 changed files with 67 additions and 20 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ function describeConfig(
`配置: ${config.path}`,
`渠道: ${channel ? formatChannelLabel(channel, 0) : "ntfy(未配置)"}`,
`事件: ${(["idle", "interrupted", "needInput", "exit"] as const).map((key) => `${key}=${config.events[key] ? "on" : "off"}`).join(" ")}`,
`模式: ${config.modes.join(",")}`,
`模式: 全部${config.excludedModes.length > 0 ? `(排除: ${config.excludedModes.join(", ")})` : ""}`,
];
if (last && describeResults)
lines.push(