From 1c8e9816febe1935cd4cb20971d4b28099e9c26e Mon Sep 17 00:00:00 2001 From: Rick Ye Date: Fri, 11 Sep 2026 10:45:03 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=8F=92=E4=BB=B6=E8=A1=8C=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=B8=A4=E8=A1=8C=E5=B8=83=E5=B1=80=E2=80=94=E2=80=94?= =?UTF-8?q?=E5=B7=B2=E5=90=AF=E5=8A=A8/=E5=B7=B2=E5=85=B3=E9=97=AD+?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=BC=80=E5=85=B3=E3=80=81=E5=85=A5=E5=8F=A3?= =?UTF-8?q?+=E5=85=A5=E5=8F=A3=E5=BC=80=E5=85=B3=EF=BC=9B=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=8F=8F=E8=BF=B0=E7=B2=BE=E7=AE=80=E4=B8=BA=E3=80=8C?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=8F=92=E4=BB=B6=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renderer/src/components/SettingsModal.tsx | 83 ++++++++----------- 1 file changed, 36 insertions(+), 47 deletions(-) diff --git a/apps/desktop/src/renderer/src/components/SettingsModal.tsx b/apps/desktop/src/renderer/src/components/SettingsModal.tsx index 7b8e319..8764bcc 100644 --- a/apps/desktop/src/renderer/src/components/SettingsModal.tsx +++ b/apps/desktop/src/renderer/src/components/SettingsModal.tsx @@ -59,7 +59,7 @@ const TAB_META: Record, { title: string; desc: s general: { title: '常规', desc: '主题色等外观偏好。' }, model: { title: '模型设置', desc: '' }, prompt: { title: '系统提示词', desc: '' }, - plugins: { title: '插件', desc: '扩展插件(内置 / 全局 / 项目),按需启停。' }, + plugins: { title: '插件', desc: '扩展插件' }, skills: { title: '技能', desc: 'SKILL.md 技能包,Agent 自动按需加载。' }, commands: { title: '命令', desc: '聊天中 / 触发的自定义命令模板。' } } @@ -635,7 +635,6 @@ function PluginsPanel({ onToggle, devBuild, onOpenDir, - onOpenSettings, onNavToggle }: { /** 正在切换中的插件 id(切换期间全部开关禁用,避免并发重建运行时) */ @@ -644,8 +643,6 @@ function PluginsPanel({ /** 开发版构建(第三方装载开关开启);用户版展示关闭提示 */ devBuild: boolean onOpenDir: (path: string) => void - /** 打开插件自己的二级配置页(仅已声明设置表单的插件出现) */ - onOpenSettings: (pluginId: string) => void /** 把设置入口固定/移出到设置页一级导航 */ onNavToggle: (pluginId: string, on: boolean) => void }): ReactNode { @@ -729,31 +726,41 @@ function PluginsPanel({ (a.manifest.order ?? 100) - (b.manifest.order ?? 100) || a.manifest.id.localeCompare(b.manifest.id) ) .map((p) => ( -
-
- {p.manifest.name} - - {scope === 'builtin' ? '内置' : scope === 'user' ? '全局' : '项目'} v{p.manifest.version} - - {p.enabled ? '已启用' : '已停用'} - {p.hasSettings && p.enabled && ( - <> - +
+
+
+ {p.manifest.name} + + {scope === 'builtin' ? '内置' : scope === 'user' ? '全局' : '项目'} v{p.manifest.version} + +
+ {p.manifest.description && ( +
{p.manifest.description}
+ )} + {p.error &&
装载失败:{p.error}
} +
+
+
+ {p.enabled ? '已启动' : '已关闭'} + +
+ {p.hasSettings && p.enabled && ( +
+ 入口 - +
)} -
- {p.manifest.description &&
{p.manifest.description}
} - {p.error &&
装载失败:{p.error}
}
))}
@@ -1444,7 +1434,6 @@ export function SettingsModal({ onToggle={togglePlugin} devBuild={import.meta.env.DEV} onOpenDir={(path) => void window.api.openPath(path)} - onOpenSettings={(pluginId) => setTab(`plugin:${pluginId}`)} onNavToggle={handleSetSettingsNav} /> )}