10 Commits

Author SHA1 Message Date
wonder 8c5d540565 fix: 修复所有页面 Tab 导航下方冗余空白
- 将 body 布局从普通流改为 flex 纵向布局,navbar 和内容区自然排列
- navbar 移除 position:sticky,改为 flex-shrink:0 作为固定头部
- 新增 .main-content 工具类(flex:1; overflow:hidden),替代 calc(100vh-56px)+margin-top 方案
- builder/dashboard 页面使用 main-content 类占满剩余空间
- settings 页面 margin-top 从 80px 调整为 24px
2026-06-26 17:44:01 +08:00
wonder 27a2dd743d feat: 新增参考材料前端 UI
- 在左侧片段选择卡片下方添加参考材料卡片
- 支持动态添加/删除参考材料
- 每个材料包含可选标题和内容输入
- 标题为空时自动显示为「参考材料{n}」
- 材料内容实时预览到 Prompt
- 草稿自动保存/加载包含材料数据
- 保存会话时支持保存材料
2026-06-26 17:26:34 +08:00
wonder b779099bcf fix: 选中子标签选项时同步勾选父标签复选框,并支持再次点击取消选择
- 将 radio 的 onchange 改为 onclick,支持点击已选中的 radio 触发取消
- selectTagOption 中增加父复选框 DOM 同步逻辑
- 再次点击已选中的 radio 时取消选择并重建 DOM 状态
2026-06-26 17:14:17 +08:00
wonder 1bb3978c9a fix: 将生成 Prompt 中的章节标题自定义内容改为用户输入 2026-06-26 17:07:23 +08:00
wonder a1e4246bf4 feat: 在设置页新增系统标签管理面板,放开系统标签的 CRUD 限制
- 移除 tags.go 中 UpdateTag 和 DeleteTag 对系统标签的 403 限制
- 在 settings.html 新增「系统标签管理」卡片,支持:
  - 折叠浏览所有系统标签及其选项
  - 编辑标签名称和描述
  - 编辑、添加、删除标签选项
  - 删除整个标签(带二次确认)
- .gitignore 添加 prompt-generator 二进制文件
2026-06-26 16:26:10 +08:00
wonder b23ed28b88 fix: 优化生成 Prompt 的标题映射,移除技术术语
- 标签约束 → 约束
- 用户自定义内容 → 自定义内容
- 片段内容 → 参考片段
- 片段: xxx → xxx(去掉前缀)
- 智能建议补充 → 补充建议
2026-06-26 16:05:59 +08:00
wonder 173d857dbb feat: structure view in dashboard and settings persistence
- Add GET /api/claude/sessions/{session_id}/builder API for structure view
- Load builder session tags and snippets by Claude session ID
- Implement structure view in dashboard: shows tag selections and snippet details
- Add LoadSettings to persist LLM config changes across restarts
- Settings are now loaded from database on startup

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 15:14:10 +08:00
wonder e53113db55 fix: dashboard project tree rendering and session selection
- Use data-project attribute instead of index for project identification
- Fix toggleProject to use nextElementSibling for content panel
- Highlight selected session without re-rendering tree
- Add selected-session CSS class

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 15:10:57 +08:00
wonder b7008afd29 fix: SPA routing and prompts table handling
- Add clean URL routing: /dashboard -> dashboard.html, /settings -> settings.html
- Add EnsurePromptsTable for dev environments where prompts table may not exist
- Fix nav links to use clean URLs instead of .html paths

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 15:08:12 +08:00
wonder f456cdb565 feat: add frontend — builder, dashboard, and settings pages
- common.css: 全局样式,支持亮色/暗色主题,完整组件库
- common.js: API 封装、认证模块、Toast 提示、主题切换、草稿管理
- index.html: Prompt 构建器完整 UI
  - 左侧面板:项目/会话选择、标签系统(搜索/折叠/单选)、片段选择(分组/搜索)、CLAUDE.md 输入、自定义内容
  - 右侧面板:实时 Prompt 预览、智能建议列表、复制到剪贴板
  - 草稿自动保存(localStorage,防抖 1s)
  - 新增个人标签模态框
  - 保存构建会话功能
- dashboard.html: 复盘看板
  - 左侧项目树(项目→会话层级)
  - 右侧 Prompt 列表(文本视图,XML 标签折叠)
  - 导出功能(Markdown/JSON/纯文本)
  - 关键词搜索
- settings.html: 设置页
  - LLM 配置(API URL/Key/模型)
  - 主题切换
  - 退出登录

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 15:05:46 +08:00