Commit Graph

103 Commits

Author SHA1 Message Date
c44e8174c4 Merge branch 'feat/book-import-from-zip' 2026-06-24 05:07:39 -06:00
a427bba8c8 feat: 从书籍生成教案(粘贴目录 + 上传 md 压缩包)
新增「从书籍生成」流程:用户粘贴教材目录(多行)并上传内含各章
.md 的 ZIP(文件名=目录标题),前端用 JSZip 解压匹配,AI 按章节
体量划分课时,预览/编辑后批量生成,每篇以对应章节正文作为上下文。

服务端
- generate.ts: 新增 POST /lessons-from-book(目录条目→AI 划分课时
  JSON,剥围栏/校验/丢非法行);扩展 POST / 支持可选 content 上下文,
  无 content 时请求体不变(向后兼容)。

前端
- bookImport.ts: normalizeTitle / parseZip / matchToc / assembleContent。
- booksApi.ts: generateLesson 兼容签名 + divideLessonsFromBook。
- useTeachingBook.ts: 抽出 runGenerationPool,新增 generateLessonsFromBook。
- BookImportDialog.vue 多阶段对话框;UploadDropzone 加 accept/multiple;
  菜单串接「从书籍生成」。

顺带修复 5 个遗留失败测试:import 功能已于 fb0b8d1 删除但测试漏删,
清理孤儿测试;批量生成对齐为单参 generateLesson(topic)。

docs/book-import-spec.md 记录规格。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 05:07:19 -06:00
b18bde8d2a update 2026-06-24 00:37:19 -06:00
12acaae38b fix: close other open toolbar menus when a menu button is clicked
The toggle button used @click.stop, which halted the click before it
reached the document-level outside-click listeners. As a result, opening
one dropdown (e.g. export) left a previously-opened dropdown (e.g.
generate) still open. The containment check in handleDocumentClick
already prevents a toggle's own opening click from self-closing, so
.stop was unnecessary; removing it lets sibling menus close on outside
click as intended.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 02:58:55 -06:00
c7e4dd02bc copy: shorten toolbar button labels (生成教案→生成, 返回列表→返回)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 22:46:37 -06:00
6d54750b37 docs: add implementation plan for merging print/export buttons
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:33:51 -06:00
7da3f15ecd style: rename generate-menu CSS classes to generic toolbar-menu 2026-06-22 19:30:48 -06:00
5723470f65 feat: merge print/export buttons into a single dropdown in WorkspaceToolbar 2026-06-22 19:28:09 -06:00
78a082b273 feat: add ExportMenuButton dropdown component 2026-06-22 19:24:35 -06:00
462714f45e refactor: rebuild GenerateMenuButton on top of ToolbarMenuButton 2026-06-22 19:21:11 -06:00
1fb8fe6680 feat: add generic ToolbarMenuButton dropdown component 2026-06-22 19:17:13 -06:00
4e23d3b163 docs: add design for merging print/export buttons into a dropdown 2026-06-22 19:12:39 -06:00
d44f0e0c7b fix: put 生成一篇 in second position in the generate dropdown menu
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:05:36 -06:00
9ceaf8dcd3 style: add dropdown styling for the merged generate menu button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:01:25 -06:00
2a647ee1ad feat: merge generate buttons into a single dropdown in WorkspaceToolbar
- Wire GenerateMenuButton component into WorkspaceToolbar.vue
- Update WorkspaceToolbar.test.ts to open dropdown before clicking menu items
- Update WorkspaceView.test.ts to open dropdown before clicking generate buttons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 18:57:23 -06:00
1d5a2aaaff feat: add GenerateMenuButton dropdown component
Implements a dropdown menu button component with generate and batch generate options. Includes click-outside and Escape-key menu closing behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 18:50:49 -06:00
4050f04c94 docs: add design for merging generate buttons into dropdown menu 2026-06-22 18:45:08 -06:00
17e2d94ea1 update 2026-06-22 18:39:44 -06:00
3ae7e60d43 update 2026-06-16 22:54:38 -06:00
ceb04a1b83 fix: wrap workspace toolbar buttons on narrow mobile widths 2026-06-16 22:23:23 -06:00
2de18e40e2 feat: add sidebar/table hover tints and focus-visible ring for buttons 2026-06-16 22:20:06 -06:00
a0f26117a6 feat: add transitions and active-press feedback to buttons and editable fields 2026-06-16 22:18:01 -06:00
e3a21a46b5 feat: add radius/spacing design tokens and apply across styles 2026-06-16 22:15:09 -06:00
be8fe206bf docs: add UI detail polish implementation plan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 22:11:27 -06:00
1d123bfac3 fix: add spacing between reset-password and delete buttons in user management
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 22:10:45 -06:00
59e8bfb2a9 docs: add UI detail polish design spec
Spec covering radius/spacing tokens, interaction feedback (hover/active/
focus-visible), and a mobile workspace-toolbar wrapping fix, based on
live screenshot review of the running app.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 20:03:07 -06:00
58dfe3e455 update 2026-06-16 11:19:12 -06:00
973348115c update 2026-06-16 11:16:34 -06:00
028ba0f2f9 feat: add creator 2026-06-16 11:05:56 -06:00
33d5bfd8e9 fix 2026-06-16 10:05:23 -06:00
fb0b8d11c9 remove import teaching design feature
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 09:59:15 -06:00
6e2a17f63f update 2026-06-16 09:54:46 -06:00
b0e70d7b71 fix 2026-06-16 09:44:20 -06:00
c49221ac22 fix 2026-06-16 09:39:18 -06:00
55282963b5 fix 2026-06-16 09:37:50 -06:00
02ca889bc2 fix 2026-06-16 09:33:44 -06:00
10edc664e8 fix 2026-06-16 09:28:41 -06:00
667f8be21c fix 2026-06-16 09:23:00 -06:00
0dc1a35365 fix 2026-06-16 09:08:13 -06:00
804224fc3c update 2026-06-16 09:01:02 -06:00
494fbef7b4 update 2026-06-16 08:58:06 -06:00
660039b3cf update 2026-06-16 08:18:10 -06:00
19cc1ffdfa docs: add frontend routing design 2026-06-16 07:57:22 -06:00
dcec78d4b7 fix 2026-06-16 07:51:38 -06:00
8b0e4df43d feat: add concurrent batch lesson generation 2026-06-16 07:33:29 -06:00
2321b5f68e Merge branch 'remove-cover-page' 2026-06-16 07:17:25 -06:00
7b95324649 feat: remove cover page 2026-06-16 07:14:39 -06:00
a2534459d0 fix 2026-06-16 07:08:13 -06:00
085f70bd64 docs: add remove cover page plan 2026-06-16 07:02:10 -06:00
febce4015b update 2026-06-16 06:56:55 -06:00