From 09114e210fdca29a63a47d434dfd58b0ec27c2fa Mon Sep 17 00:00:00 2001 From: pyh Date: Wed, 30 Sep 2026 16:29:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(client):=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=9D=97=E5=8E=BB=E6=8E=89=E4=B8=8E=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=A1=B5=E9=A1=B6=E9=83=A8=E9=87=8D=E5=A4=8D=E7=9A=84=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=92=8C=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++++- client.js | 12 ++++++------ package.json | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d8d9fb8..7bca00b 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,13 @@ Windows / macOS / Linux 三个平台走的是同一条通知通道(渲染进 - 三个开关分别控制**完成 / 授权 / 提问**三类提醒(默认全开),状态存在浏览器本地,重装插件不丢; - 最后一段显示观察器自身的健康状态(收不到会话状态时直接标红)。 -设置放在插件自己的页面里,而不是「设置 → 通用」:它是这个插件的配置,不是 DSH 的通用偏好。 +设置放在插件自己的页面里,而不是「设置 → 通用」:它是这个插件的配置,不是 DSH 的通用偏好。页面顶部是 DSH 自己渲染的插件标题与描述,所以这块配置不再重复标题,直接用一句「提醒是怎么送出去的」开头。 + +### 关于「包含的组件」 + +插件页下方那一段(`组件` / `包含的组件`)是 **DSH 插件页固定渲染**的:`ui-plugin-manager` 的 `RowsSection` 无条件列出这个 bundle 在 `cordis.patch.yml` 里声明的**每一行**(行 id、运行状态、单独开关),没有"跳过"的口子。因为任何 bundle 都至少要声明一行才能挂上宿主半,所以这一节必然出现——本插件就是这一行。 + +它也不是纯冗余:它标出运行状态、允许单独关掉这个组件,并且当 bundle 与组件的关系变得复杂时是唯一的入口。如果你觉得一个组件时看着奇怪,那是 DSH 的呈现方式,插件侧没法隐藏。 ## 安装 diff --git a/client.js b/client.js index 826311f..fe27877 100644 --- a/client.js +++ b/client.js @@ -84,11 +84,10 @@ window.__ModuleLoader__.load({ 'settings.kind.completion': '完成', 'settings.kind.approval': '授权', 'settings.kind.question': '提问', - 'config.title': '会话通知', - 'config.note': '只在会话需要你注意时提醒,而且只在 DSH 运行时。', 'config.section.kinds': '提醒内容', 'config.section.permission': '系统通知权限', 'config.section.status': '运行状态', + 'config.intro': '提醒都从当前页面发出:窗口不在前台时是系统通知,窗口在前台时是这里的轻弹窗。', 'config.saveNote': '开关保存在浏览器本地,重装插件不会丢失。', } const en = { @@ -125,11 +124,10 @@ window.__ModuleLoader__.load({ 'settings.kind.completion': 'Finished', 'settings.kind.approval': 'Approval', 'settings.kind.question': 'Questions', - 'config.title': 'Session notifications', - 'config.note': 'Alerts you when a conversation needs attention, while DSH is running.', 'config.section.kinds': 'What to notify about', 'config.section.permission': 'System notification permission', 'config.section.status': 'Status', + 'config.intro': 'Every alert comes from this page: a system notification while the window is in the background, the light popup here while it is in the foreground.', 'config.saveNote': 'The switches are stored in this browser and survive reinstalling the plugin.', } @@ -1012,9 +1010,11 @@ window.__ModuleLoader__.load({ return h(React.Fragment, null, h('style', null, CSS), h('div', { className: 'dsn-sections' }, + // The page header already shows this bundle's title and description, so + // this section opens with what the header cannot say: how alerts are + // carried, and what this form changes. h('section', { className: 'dsn-section' }, - h('h3', { className: 'dsn-section-title' }, tr('config.title')), - h('p', { className: 'dsn-section-desc' }, tr('config.note'))), + h('p', { className: 'dsn-section-desc' }, tr('config.intro'))), h('section', { className: 'dsn-section' }, h('h3', { className: 'dsn-section-title' }, tr('config.section.kinds')), KINDS.map((kind) => h(KindRow, { diff --git a/package.json b/package.json index 45246e0..3555b4f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dsh-plugin/session-notify", - "version": "1.0.3", + "version": "1.0.4", "private": true, "type": "module", "description": "会话完成、需要授权、需要回答时提醒你:窗口不在前台用系统通知,窗口在前台用应用内轻弹窗。",