feat(web): 插件管理弹窗(启停 / 重载)
- 顶栏新增「插件管理」图标按钮,打开 PluginsDialog - 弹窗列出 pugins/ 下的插件:标题 / 目录名 / 是否启用与已加载 / 平台 label / 能力清单 - 每个插件可启用、停用、重载,底部有「全部重载」 - 启停成功后重新拉 /api/platforms,「添加账号」的平台下拉同步刷新 - types.ts 新增 PluginInfo;App.tsx 把平台列表加载提成 loadPlatforms 复用 - static/ 重新构建(pnpm typecheck + pnpm build 均通过) - 顺带把 .vscode/ 纳入跟踪
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Plus, RefreshCw, ScrollText, Settings2 } from 'lucide-react'
|
||||
import { Plus, Puzzle, RefreshCw, ScrollText, Settings2 } from 'lucide-react'
|
||||
|
||||
import { Button } from './ui/Button'
|
||||
|
||||
@@ -7,12 +7,14 @@ export function TopBar({
|
||||
onRefresh,
|
||||
onSettings,
|
||||
onSystemLog,
|
||||
onPlugins,
|
||||
onAdd,
|
||||
}: {
|
||||
refreshing: boolean
|
||||
onRefresh: () => void
|
||||
onSettings: () => void
|
||||
onSystemLog: () => void
|
||||
onPlugins: () => void
|
||||
onAdd: () => void
|
||||
}) {
|
||||
return (
|
||||
@@ -50,6 +52,15 @@ export function TopBar({
|
||||
>
|
||||
<RefreshCw className="size-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={onPlugins}
|
||||
title="插件管理"
|
||||
aria-label="插件管理"
|
||||
>
|
||||
<Puzzle className="size-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
|
||||
Reference in New Issue
Block a user