feat: 新增 UI 操控面板系统

- 新增 themes.js: 4 套配色主题 (Crimson/Cyan/Amber/Violet) + applyTheme()
- 新增 panel.html: 响应式面板模板 (Desktop 双栏 + Mobile 底部 Tab)
- 新增 graph-renderer.js: Canvas 力导向图谱渲染器 (零依赖)
- 新增 panel.js: Tab 切换、数据渲染、搜索过滤、节点详情、操作绑定
- 修改 style.css: +720 行面板样式 + @media 响应式
- 修改 index.js: 面板初始化 + Options 菜单注入 + action handlers
- 修改 settings.html: 主题选择下拉框 + 打开面板按钮
- 修改 graph.js: 新增 getActiveNodes() 辅助函数
This commit is contained in:
Youzini-afk
2026-03-23 22:18:36 +08:00
parent 2ca5106767
commit 0a07b7df44
8 changed files with 2174 additions and 1 deletions

View File

@@ -90,6 +90,15 @@ export function addNode(graph, node) {
return node;
}
/**
* 获取所有活跃(未归档)节点
* @param {GraphState} graph
* @returns {Array}
*/
export function getActiveNodes(graph) {
return graph.nodes.filter((n) => !n.archived);
}
/**
* 根据 ID 获取节点
* @param {GraphState} graph