🐛 fix(client): 配置块去掉与插件页顶部重复的标题和描述

This commit is contained in:
pyh
2026-09-30 16:29:06 +08:00
parent f0c11176f2
commit 09114e210f
3 changed files with 14 additions and 8 deletions
+7 -1
View File
@@ -33,7 +33,13 @@ Windows / macOS / Linux 三个平台走的是同一条通知通道(渲染进
- 三个开关分别控制**完成 / 授权 / 提问**三类提醒(默认全开),状态存在浏览器本地,重装插件不丢;
- 最后一段显示观察器自身的健康状态(收不到会话状态时直接标红)。
设置放在插件自己的页面里,而不是「设置 → 通用」:它是这个插件的配置,不是 DSH 的通用偏好。
设置放在插件自己的页面里,而不是「设置 → 通用」:它是这个插件的配置,不是 DSH 的通用偏好。页面顶部是 DSH 自己渲染的插件标题与描述,所以这块配置不再重复标题,直接用一句「提醒是怎么送出去的」开头。
### 关于「包含的组件」
插件页下方那一段(`组件` / `包含的组件`)是 **DSH 插件页固定渲染**的:`ui-plugin-manager` 的 `RowsSection` 无条件列出这个 bundle 在 `cordis.patch.yml` 里声明的**每一行**(行 id、运行状态、单独开关),没有"跳过"的口子。因为任何 bundle 都至少要声明一行才能挂上宿主半,所以这一节必然出现——本插件就是这一行。
它也不是纯冗余:它标出运行状态、允许单独关掉这个组件,并且当 bundle 与组件的关系变得复杂时是唯一的入口。如果你觉得一个组件时看着奇怪,那是 DSH 的呈现方式,插件侧没法隐藏。
## 安装
+6 -6
View File
@@ -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, {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@dsh-plugin/session-notify",
"version": "1.0.3",
"version": "1.0.4",
"private": true,
"type": "module",
"description": "会话完成、需要授权、需要回答时提醒你:窗口不在前台用系统通知,窗口在前台用应用内轻弹窗。",