From 832bd539a2bca2518cbf575d9b61606f868290e4 Mon Sep 17 00:00:00 2001 From: xmanrui <841206367@qq.com> Date: Fri, 21 Aug 2026 04:23:51 +0800 Subject: [PATCH] feat(office): mark connector as experimental --- lib/client.js | 9 ++++++--- plugin-src/client/i18n.js | 1 + plugin-src/client/index.js | 3 ++- plugin-src/client/styles.js | 3 ++- test/client-ui.test.mjs | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/client.js b/lib/client.js index 2ec2b14..3a7ea01 100644 --- a/lib/client.js +++ b/lib/client.js @@ -399,6 +399,7 @@ var EN = Object.freeze({ "IM \u6E20\u9053": "IM channels", "\u8BA9 DeepSeek Harness \u89E6\u624B\u53EF\u53CA": "DeepSeek Harness, always within reach", "AI Office": "AI Office", + "\uFF08\u5B9E\u9A8C\u529F\u80FD\uFF09": "(Experimental)", "AI Office \u8BBE\u7F6E": "AI Office settings", "AI Office \u8BBE\u7F6E\u9875\u7F3A\u5C11 RPC \u8FDE\u63A5": "AI Office settings are missing an RPC connection", "\u6B63\u5728\u8BFB\u53D6 AI Office Connector\u2026": "Loading AI Office Connector\u2026", @@ -8901,8 +8902,9 @@ var CSS11 = String.raw` .dim-logoSlack svg { width: 21px; height: 21px; } .dim-logoWhatsapp { color: white; background: #25d366; } .dim-logoWhatsapp svg { width: 21px; height: 21px; } -.dim-channelCopy { min-width: 0; display: block; } +.dim-channelCopy { min-width: 0; display: grid; } .dim-channelCopy strong { overflow: hidden; color: inherit; font-size: 14px; line-height: 20px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; } +.dim-channelNote { overflow: hidden; color: var(--dsw-alias-label-tertiary, #8f959e); font-size: 10px; line-height: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; } .dim-divider { width: 1px; min-height: 520px; background: var(--dsw-alias-border-l1, #eef0f3); } .dim-panel { min-width: 0; container-type: inline-size; } .dim-panel .bxf-page, .dim-panel .dxw-page, .dim-panel .ddt-page, .dim-panel .dqq-page, .dim-panel .dwecom-page, .dim-panel .dsl-page, .dim-panel .dwa-page { width: 100%; max-width: none; padding: 0 0 24px; } @@ -9131,7 +9133,7 @@ var CHANNELS = Object.freeze([ { id: "telegram", label: "Telegram" }, { id: "discord", label: "Discord" }, { id: "whatsapp", label: "WhatsApp" }, - { id: "office", label: "AI Office" } + { id: "office", label: "AI Office", note: "\uFF08\u5B9E\u9A8C\u529F\u80FD\uFF09" } ]); function WeixinLogo() { return h2( @@ -9283,7 +9285,8 @@ function IMSettingsTab({ h2( "span", { className: "dim-channelCopy" }, - h2("strong", null, channel4.label) + h2("strong", null, channel4.label), + channel4.note ? h2("small", { className: "dim-channelNote" }, channel4.note) : null ) )) ), diff --git a/plugin-src/client/i18n.js b/plugin-src/client/i18n.js index 90d482c..741a236 100644 --- a/plugin-src/client/i18n.js +++ b/plugin-src/client/i18n.js @@ -9,6 +9,7 @@ const EN = Object.freeze({ 'IM 渠道': 'IM channels', '让 DeepSeek Harness 触手可及': 'DeepSeek Harness, always within reach', 'AI Office': 'AI Office', + '(实验功能)': '(Experimental)', 'AI Office 设置': 'AI Office settings', 'AI Office 设置页缺少 RPC 连接': 'AI Office settings are missing an RPC connection', '正在读取 AI Office Connector…': 'Loading AI Office Connector…', diff --git a/plugin-src/client/index.js b/plugin-src/client/index.js index 5426a49..57c8ca7 100644 --- a/plugin-src/client/index.js +++ b/plugin-src/client/index.js @@ -58,7 +58,7 @@ const CHANNELS = Object.freeze([ { id: 'telegram', label: 'Telegram' }, { id: 'discord', label: 'Discord' }, { id: 'whatsapp', label: 'WhatsApp' }, - { id: 'office', label: 'AI Office' }, + { id: 'office', label: 'AI Office', note: '(实验功能)' }, ]); function WeixinLogo() { @@ -176,6 +176,7 @@ export function IMSettingsTab({ h(ChannelLogo, { channel: channel.id }), h('span', { className: 'dim-channelCopy' }, h('strong', null, channel.label), + channel.note ? h('small', { className: 'dim-channelNote' }, channel.note) : null, )))), h('div', { className: 'dim-divider', 'aria-hidden': 'true' }), h('main', { diff --git a/plugin-src/client/styles.js b/plugin-src/client/styles.js index ed35346..57c890b 100644 --- a/plugin-src/client/styles.js +++ b/plugin-src/client/styles.js @@ -52,8 +52,9 @@ const CSS = String.raw` .dim-logoSlack svg { width: 21px; height: 21px; } .dim-logoWhatsapp { color: white; background: #25d366; } .dim-logoWhatsapp svg { width: 21px; height: 21px; } -.dim-channelCopy { min-width: 0; display: block; } +.dim-channelCopy { min-width: 0; display: grid; } .dim-channelCopy strong { overflow: hidden; color: inherit; font-size: 14px; line-height: 20px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; } +.dim-channelNote { overflow: hidden; color: var(--dsw-alias-label-tertiary, #8f959e); font-size: 10px; line-height: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; } .dim-divider { width: 1px; min-height: 520px; background: var(--dsw-alias-border-l1, #eef0f3); } .dim-panel { min-width: 0; container-type: inline-size; } .dim-panel .bxf-page, .dim-panel .dxw-page, .dim-panel .ddt-page, .dim-panel .dqq-page, .dim-panel .dwecom-page, .dim-panel .dsl-page, .dim-panel .dwa-page { width: 100%; max-width: none; padding: 0 0 24px; } diff --git a/test/client-ui.test.mjs b/test/client-ui.test.mjs index 117a8b0..dbe8504 100644 --- a/test/client-ui.test.mjs +++ b/test/client-ui.test.mjs @@ -140,7 +140,7 @@ test('IM settings renders nine IM channels plus the AI Office connector', async assert.match(markup, />TelegramDiscordWhatsAppAI OfficeAI Office<\/strong>(实验功能)<\/small>/); assert.match(markup, /dim-logoWeixin/); assert.match(markup, /dim-logoFeishu/); assert.match(markup, /dim-logoDingtalk/); @@ -648,6 +648,7 @@ test('client registers a live bilingual locale seat and directory picker for the assert.match(markup, /Help & feedback · Open GitHub/); assert.match(markup, />WeChat<|>Feishu<|>DingTalk<|>WeComQQ<[^]*>Slack<[^]*>Telegram<[^]*>Discord<[^]*>WhatsAppAI Office<\/strong>\(Experimental\)<\/small>/); assert.doesNotMatch(markup, /[\p{Script=Han}]/u); } finally { setImTranslator(null);