feat: 章节附件并入章节编辑对话框 (#37)

- 章节列表每行只保留「编辑」;移除「附件」按钮与独立的附件对话框
- 章节编辑对话框同时编辑标题、正文、本章插图与本章音频,并明确写出生效时机:
  标题与正文点「保存章节」后生效,插图与音频在选中文件后立即上传、取消不撤销
- 无插图/音频的章节仍显示「未设置」,后端口与 schema 无变化(仍 v9)
- 测试:157 单测与 26 项 E2E 通过(新断言:章节行只有一个按钮、对话框含四类控件与时机说明、
  对话框内上传后仍可用保存按钮提交文本);真实链路确认按钮数为 1、上传即时生效、取消后阅读页正常
- 文档:Architecture / Business-Rules / Local-Development / Requirements / Home 同步
This commit is contained in:
ila
2026-09-15 22:14:21 +08:00
parent 3ab26afe4a
commit 771c3df976
9 changed files with 181 additions and 80 deletions
+1
View File
@@ -367,6 +367,7 @@ button:focus-visible, a:focus-visible, [role='button']:focus-visible,
.attachment-info { min-width: 0; flex: 1; }
.attachment-label { margin: 0 0 4px; font-weight: 600; }
.attachment-info .subtle { margin: 4px 0 0; }
.attachment-heading { margin: 22px 0 4px; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.attachment-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 0; }
.attachment-actions input[type='file'] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.attachment-actions label { position: relative; cursor: pointer; border: 1px solid var(--border-strong); border-radius: 20px; padding: 0 14px; background: var(--surface-raised); }