Add files via upload

This commit is contained in:
公明
2026-07-06 13:55:51 +08:00
committed by GitHub
parent a425df2607
commit ecc75ee326
8 changed files with 870 additions and 36 deletions
+165
View File
@@ -3357,6 +3357,46 @@
<span class="robot-card-action" data-i18n="settings.robots.configure">配置</span>
</span>
</button>
<button type="button" class="robot-card" data-robot-card="telegram" onclick="openRobotEditor('telegram')">
<span class="robot-card-main">
<span class="robot-card-title" data-i18n="settings.robots.telegram.title">Telegram</span>
<span class="robot-card-desc" data-i18n="settings.robots.telegram.subtitle">Bot API 长轮询,私聊与群聊 @</span>
</span>
<span class="robot-card-meta">
<span id="robot-card-telegram-status" class="robot-status-pill robot-status-pill--idle" data-i18n="settings.robots.statusNotConfigured">未配置</span>
<span class="robot-card-action" data-i18n="settings.robots.configure">配置</span>
</span>
</button>
<button type="button" class="robot-card" data-robot-card="slack" onclick="openRobotEditor('slack')">
<span class="robot-card-main">
<span class="robot-card-title" data-i18n="settings.robots.slack.title">Slack</span>
<span class="robot-card-desc" data-i18n="settings.robots.slack.subtitle">Socket Mode,无需公网回调</span>
</span>
<span class="robot-card-meta">
<span id="robot-card-slack-status" class="robot-status-pill robot-status-pill--idle" data-i18n="settings.robots.statusNotConfigured">未配置</span>
<span class="robot-card-action" data-i18n="settings.robots.configure">配置</span>
</span>
</button>
<button type="button" class="robot-card" data-robot-card="discord" onclick="openRobotEditor('discord')">
<span class="robot-card-main">
<span class="robot-card-title" data-i18n="settings.robots.discord.title">Discord</span>
<span class="robot-card-desc" data-i18n="settings.robots.discord.subtitle">Gateway WebSocket,私聊与服务器 @</span>
</span>
<span class="robot-card-meta">
<span id="robot-card-discord-status" class="robot-status-pill robot-status-pill--idle" data-i18n="settings.robots.statusNotConfigured">未配置</span>
<span class="robot-card-action" data-i18n="settings.robots.configure">配置</span>
</span>
</button>
<button type="button" class="robot-card" data-robot-card="qq" onclick="openRobotEditor('qq')">
<span class="robot-card-main">
<span class="robot-card-title" data-i18n="settings.robots.qq.title">QQ 机器人</span>
<span class="robot-card-desc" data-i18n="settings.robots.qq.subtitle">QQ 开放平台 WebSocketC2C 与群 @</span>
</span>
<span class="robot-card-meta">
<span id="robot-card-qq-status" class="robot-status-pill robot-status-pill--idle" data-i18n="settings.robots.statusNotConfigured">未配置</span>
<span class="robot-card-action" data-i18n="settings.robots.configure">配置</span>
</span>
</button>
</div>
</div>
@@ -3522,6 +3562,115 @@
</div>
</div>
<!-- Telegram -->
<div class="settings-subsection robot-editor-panel" data-robot-editor="telegram" hidden>
<h4 data-i18n="settings.robots.telegram.title">Telegram</h4>
<div class="settings-form">
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="robot-telegram-enabled" class="modern-checkbox" />
<span class="checkbox-custom"></span>
<span class="checkbox-text" data-i18n="settings.robots.telegram.enabled">启用 Telegram 机器人</span>
</label>
</div>
<div class="form-group">
<label for="robot-telegram-bot-token" data-i18n="settings.robots.telegram.botToken">Bot Token</label>
<input type="password" id="robot-telegram-bot-token" autocomplete="off" placeholder="从 @BotFather 获取" />
<small class="form-hint" data-i18n="settings.robots.telegram.botTokenHint">通过 getUpdates 长轮询收消息,无需公网回调</small>
</div>
<div class="form-group">
<label for="robot-telegram-bot-username" data-i18n="settings.robots.telegram.botUsername">Bot Username(可选)</label>
<input type="text" id="robot-telegram-bot-username" autocomplete="off" placeholder="不含 @,留空则自动 getMe" />
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="robot-telegram-allow-group" class="modern-checkbox" />
<span class="checkbox-custom"></span>
<span class="checkbox-text" data-i18n="settings.robots.telegram.allowGroup">允许群聊(仅响应 @ 机器人)</span>
</label>
</div>
</div>
</div>
<!-- Slack -->
<div class="settings-subsection robot-editor-panel" data-robot-editor="slack" hidden>
<h4 data-i18n="settings.robots.slack.title">Slack</h4>
<div class="settings-form">
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="robot-slack-enabled" class="modern-checkbox" />
<span class="checkbox-custom"></span>
<span class="checkbox-text" data-i18n="settings.robots.slack.enabled">启用 Slack 机器人</span>
</label>
</div>
<div class="form-group">
<label for="robot-slack-bot-token" data-i18n="settings.robots.slack.botToken">Bot Token (xoxb-)</label>
<input type="password" id="robot-slack-bot-token" autocomplete="off" />
</div>
<div class="form-group">
<label for="robot-slack-app-token" data-i18n="settings.robots.slack.appToken">App-Level Token (xapp-)</label>
<input type="password" id="robot-slack-app-token" autocomplete="off" />
<small class="form-hint" data-i18n="settings.robots.slack.appTokenHint">需 connections:write 权限,用于 Socket Mode</small>
</div>
</div>
</div>
<!-- Discord -->
<div class="settings-subsection robot-editor-panel" data-robot-editor="discord" hidden>
<h4 data-i18n="settings.robots.discord.title">Discord</h4>
<div class="settings-form">
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="robot-discord-enabled" class="modern-checkbox" />
<span class="checkbox-custom"></span>
<span class="checkbox-text" data-i18n="settings.robots.discord.enabled">启用 Discord 机器人</span>
</label>
</div>
<div class="form-group">
<label for="robot-discord-bot-token" data-i18n="settings.robots.discord.botToken">Bot Token</label>
<input type="password" id="robot-discord-bot-token" autocomplete="off" />
<small class="form-hint" data-i18n="settings.robots.discord.botTokenHint">开发者门户创建 Bot,开启 Message Content Intent</small>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="robot-discord-allow-guild" class="modern-checkbox" />
<span class="checkbox-custom"></span>
<span class="checkbox-text" data-i18n="settings.robots.discord.allowGuild">允许服务器频道(仅响应 @ 机器人)</span>
</label>
</div>
</div>
</div>
<!-- QQ -->
<div class="settings-subsection robot-editor-panel" data-robot-editor="qq" hidden>
<h4 data-i18n="settings.robots.qq.title">QQ 机器人</h4>
<div class="settings-form">
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="robot-qq-enabled" class="modern-checkbox" />
<span class="checkbox-custom"></span>
<span class="checkbox-text" data-i18n="settings.robots.qq.enabled">启用 QQ 机器人</span>
</label>
</div>
<div class="form-group">
<label for="robot-qq-app-id" data-i18n="settings.robots.qq.appId">App ID</label>
<input type="text" id="robot-qq-app-id" autocomplete="off" />
</div>
<div class="form-group">
<label for="robot-qq-client-secret" data-i18n="settings.robots.qq.clientSecret">Client Secret</label>
<input type="password" id="robot-qq-client-secret" autocomplete="off" />
<small class="form-hint" data-i18n="settings.robots.qq.secretHint">从 QQ 机器人开放平台获取;上线前可勾选沙箱</small>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="robot-qq-sandbox" class="modern-checkbox" />
<span class="checkbox-custom"></span>
<span class="checkbox-text" data-i18n="settings.robots.qq.sandbox">沙箱环境</span>
</label>
</div>
</div>
</div>
<div id="robot-create-modal" class="modal" role="dialog" aria-modal="true" aria-labelledby="robot-create-title">
<div class="modal-content robot-create-modal-content">
<div class="modal-header">
@@ -3547,6 +3696,22 @@
<span data-i18n="settings.robots.lark.title">飞书 (Lark)</span>
<small data-i18n="settings.robots.lark.subtitle">企业应用机器人</small>
</button>
<button type="button" class="robot-type-option" onclick="selectRobotType('telegram')">
<span data-i18n="settings.robots.telegram.title">Telegram</span>
<small data-i18n="settings.robots.telegram.subtitle">Bot API 长轮询</small>
</button>
<button type="button" class="robot-type-option" onclick="selectRobotType('slack')">
<span data-i18n="settings.robots.slack.title">Slack</span>
<small data-i18n="settings.robots.slack.subtitle">Socket Mode</small>
</button>
<button type="button" class="robot-type-option" onclick="selectRobotType('discord')">
<span data-i18n="settings.robots.discord.title">Discord</span>
<small data-i18n="settings.robots.discord.subtitle">Gateway WebSocket</small>
</button>
<button type="button" class="robot-type-option" onclick="selectRobotType('qq')">
<span data-i18n="settings.robots.qq.title">QQ 机器人</span>
<small data-i18n="settings.robots.qq.subtitle">QQ 开放平台</small>
</button>
</div>
</div>
</div>