mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-07-09 14:31:57 +08:00
feat(channels): add iMessage config compatibility
This commit is contained in:
@@ -234,6 +234,21 @@ export default {
|
||||
signalAllowFromPh: _('可选,逗号分隔', 'Optional, comma-separated', '可選,逗號分隔'),
|
||||
signalGroupAllowFromPh: _('可选,逗号分隔群组 ID', 'Optional, comma-separated group IDs', '可選,逗號分隔群組 ID'),
|
||||
signalBlockStreaming: _('阻止流式分块', 'Block streaming chunks', '阻止串流分塊'),
|
||||
imessageDesc: _('接入 iMessage / SMS 桥接,支持本机或远端 Mac 运行', 'Connect iMessage / SMS bridge from a local or remote Mac', '接入 iMessage / SMS 橋接,支援本機或遠端 Mac 執行'),
|
||||
imessageGuide1: _('在可访问 Messages 数据库的 macOS 设备上安装 iMessage 桥接插件', 'Install the iMessage bridge plugin on a macOS device that can access the Messages database', '在可存取 Messages 資料庫的 macOS 裝置上安裝 iMessage 橋接外掛'),
|
||||
imessageGuide2: _('确认桥接 CLI 可读取 chat.db,并能按需发送 iMessage 或 SMS', 'Confirm the bridge CLI can read chat.db and send iMessage or SMS when needed', '確認橋接 CLI 可讀取 chat.db,並能按需傳送 iMessage 或 SMS'),
|
||||
imessageGuide3: _('按需填写远端主机、白名单、附件目录和历史窗口', 'Fill remote host, allowlists, attachment roots, and history windows as needed', '按需填寫遠端主機、白名單、附件目錄和歷史視窗'),
|
||||
imessageGuide4: _('保存后重启或重载 Gateway,再通过渠道诊断查看桥接状态', 'Save, restart or reload Gateway, then check bridge status in channel diagnostics', '儲存後重啟或重載 Gateway,再透過頻道診斷查看橋接狀態'),
|
||||
imessageGuideFooter: _('<div style="margin-top:8px;font-size:var(--font-size-xs);color:var(--text-tertiary)">iMessage 不需要 Bot Token;运行状态取决于本机或远端 Mac 的桥接进程权限</div>', '<div style="margin-top:8px;font-size:var(--font-size-xs);color:var(--text-tertiary)">iMessage does not need a Bot Token; runtime health depends on bridge process permissions on the local or remote Mac</div>', '<div style="margin-top:8px;font-size:var(--font-size-xs);color:var(--text-tertiary)">iMessage 不需要 Bot Token;執行狀態取決於本機或遠端 Mac 的橋接程序權限</div>'),
|
||||
imessageCliPathPh: _('可选,默认从 PATH 查找桥接 CLI', 'Optional, defaults to PATH lookup for the bridge CLI', '可選,預設從 PATH 尋找橋接 CLI'),
|
||||
imessageAllowFromPh: _('可选,逗号分隔手机号、邮箱或联系人 ID', 'Optional, comma-separated phone numbers, emails, or contact IDs', '可選,逗號分隔手機號、Email 或聯絡人 ID'),
|
||||
imessageGroupAllowFromPh: _('可选,逗号分隔群聊 GUID', 'Optional, comma-separated group chat GUIDs', '可選,逗號分隔群聊 GUID'),
|
||||
imessageIncludeAttachments: _('包含附件', 'Include attachments', '包含附件'),
|
||||
imessageAttachmentRootsPh: _('可选,逗号分隔本机附件目录', 'Optional, comma-separated local attachment directories', '可選,逗號分隔本機附件目錄'),
|
||||
imessageRemoteAttachmentRootsPh: _('可选,逗号分隔远端附件目录', 'Optional, comma-separated remote attachment directories', '可選,逗號分隔遠端附件目錄'),
|
||||
imessageReadReceipts: _('发送已读回执', 'Send read receipts', '傳送已讀回執'),
|
||||
imessageReactionOwn: _('仅自己相关', 'Own only', '僅自己相關'),
|
||||
imessageCoalesceDms: _('合并同发送者私信', 'Coalesce same-sender DMs', '合併同傳送者私訊'),
|
||||
matrixDesc: _('接入 Matrix 协议(Element 等客户端)', 'Connect via Matrix protocol (Element and other clients)', '接入 Matrix 协議(Element 等用戶端)', 'Matrix プロトコルに接続'),
|
||||
matrixGuide1: _('在 Matrix 服务器上注册 Bot 账号', 'Register a Bot account on a Matrix server', '在 Matrix 伺服器上註冊 Bot 账號'),
|
||||
matrixGuide2: _('获取 <strong>Access Token</strong>(或使用用户名密码)', 'Get an <strong>Access Token</strong> (or use username & password)', '取得 <strong>Access Token</strong>(或使用使用者名密碼)'),
|
||||
@@ -244,6 +259,7 @@ export default {
|
||||
matrixAllowFromPh: _('可选,逗号分隔用户 ID', 'Optional, comma-separated user IDs', '可選,逗號分隔使用者 ID'),
|
||||
matrixAuthRequired: _('Matrix 需要填写 Access Token,或填写 User ID + Password', 'Matrix requires an Access Token, or User ID + Password'),
|
||||
groupAllGroups: _('所有群组', 'All groups', '所有群組'),
|
||||
groupAllChats: _('所有聊天', 'All chats', '所有聊天'),
|
||||
groupAllRooms: _('所有房间', 'All rooms', '所有房間'),
|
||||
groupAllTeams: _('所有团队', 'All teams', '所有團队'),
|
||||
groupMentionBot: _('仅 @机器人时', 'Only when @bot', '僅 @機器人時'),
|
||||
|
||||
@@ -492,6 +492,56 @@ const PLATFORM_REGISTRY = {
|
||||
],
|
||||
configKey: 'signal',
|
||||
},
|
||||
imessage: {
|
||||
label: 'iMessage',
|
||||
iconName: 'message-circle',
|
||||
desc: t('channels.imessageDesc'),
|
||||
guide: [
|
||||
t('channels.imessageGuide1'),
|
||||
t('channels.imessageGuide2'),
|
||||
t('channels.imessageGuide3'),
|
||||
t('channels.imessageGuide4'),
|
||||
],
|
||||
guideFooter: t('channels.imessageGuideFooter'),
|
||||
fields: [
|
||||
{ key: 'cliPath', label: 'Bridge CLI Path', placeholder: t('channels.imessageCliPathPh'), required: false },
|
||||
{ key: 'dbPath', label: 'Messages DB Path', placeholder: '~/Library/Messages/chat.db', required: false },
|
||||
{ key: 'remoteHost', label: 'Remote Host', placeholder: t('channels.optionalEg', { example: 'mac-mini.local' }), required: false },
|
||||
{ key: 'service', label: 'Service', type: 'select', options: [
|
||||
{ value: '', label: t('channels.policyDefault') },
|
||||
{ value: 'imessage', label: 'iMessage' },
|
||||
{ value: 'sms', label: 'SMS' },
|
||||
{ value: 'auto', label: 'Auto' },
|
||||
], required: false },
|
||||
{ key: 'region', label: 'Region', placeholder: t('channels.optionalEg', { example: 'US' }), required: false },
|
||||
{ key: 'dmPolicy', label: t('channels.dmPolicy'), type: 'select', options: DM_POLICY_OPTIONS, required: false },
|
||||
{ key: 'groupPolicy', label: t('channels.groupPolicy'), type: 'select', options: GROUP_POLICY_OPTIONS(t('channels.groupAllChats')), required: false },
|
||||
{ key: 'allowFrom', label: 'Allow From', placeholder: t('channels.imessageAllowFromPh'), required: false, hint: t('channels.allowFromHint') },
|
||||
{ key: 'defaultTo', label: 'Default To', placeholder: t('channels.optionalEg', { example: '+15550001111' }), required: false },
|
||||
{ key: 'groupAllowFrom', label: 'Group Allow From', placeholder: t('channels.imessageGroupAllowFromPh'), required: false, hint: t('channels.groupAllowFromHint') },
|
||||
{ key: 'historyLimit', label: 'History Limit', placeholder: '80', required: false },
|
||||
{ key: 'dmHistoryLimit', label: 'DM History Limit', placeholder: '20', required: false },
|
||||
{ key: 'mediaMaxMb', label: 'Media Max MB', placeholder: '25', required: false },
|
||||
{ key: 'probeTimeoutMs', label: 'Probe Timeout MS', placeholder: '5000', required: false },
|
||||
{ key: 'textChunkLimit', label: 'Text Chunk Limit', placeholder: '1800', required: false },
|
||||
{ key: 'includeAttachments', label: t('channels.imessageIncludeAttachments'), type: 'select', options: BOOLEAN_OPTIONS, required: false },
|
||||
{ key: 'attachmentRoots', label: 'Attachment Roots', placeholder: t('channels.imessageAttachmentRootsPh'), required: false },
|
||||
{ key: 'remoteAttachmentRoots', label: 'Remote Attachment Roots', placeholder: t('channels.imessageRemoteAttachmentRootsPh'), required: false },
|
||||
{ key: 'blockStreaming', label: t('channels.signalBlockStreaming'), type: 'select', options: BOOLEAN_OPTIONS, required: false },
|
||||
{ key: 'sendReadReceipts', label: t('channels.imessageReadReceipts'), type: 'select', options: BOOLEAN_OPTIONS, required: false },
|
||||
{ key: 'reactionNotifications', label: 'Reaction Notifications', type: 'select', options: [
|
||||
{ value: '', label: t('channels.policyDefault') },
|
||||
{ value: 'off', label: t('channels.disable') },
|
||||
{ value: 'all', label: t('channels.enable') },
|
||||
{ value: 'own', label: t('channels.imessageReactionOwn') },
|
||||
], required: false },
|
||||
{ key: 'coalesceSameSenderDms', label: t('channels.imessageCoalesceDms'), type: 'select', options: BOOLEAN_OPTIONS, required: false },
|
||||
{ key: 'responsePrefix', label: 'Response Prefix', placeholder: t('channels.optionalEg', { example: '[iMessage]' }), required: false },
|
||||
],
|
||||
configKey: 'imessage',
|
||||
pluginRequired: '@openclaw/imessage@latest',
|
||||
pluginId: 'imessage',
|
||||
},
|
||||
matrix: {
|
||||
label: 'Matrix',
|
||||
iconName: 'globe',
|
||||
|
||||
Reference in New Issue
Block a user