Skip to content

feat(studio): add multi-file ZIP export with single-file toggle#283

Open
islanddddddd wants to merge 1 commit into
Narcooo:masterfrom
islanddddddd:feat/studio-zip-export
Open

feat(studio): add multi-file ZIP export with single-file toggle#283
islanddddddd wants to merge 1 commit into
Narcooo:masterfrom
islanddddddd:feat/studio-zip-export

Conversation

@islanddddddd

Copy link
Copy Markdown

Summary

Studio 导出功能增加「合并为单一文件」复选框,支持分章 ZIP 导出。

Type of change

  • New feature

Changes

File Change
packages/studio/src/api/server.ts 新增 ZIP 分章导出 API,使用 Node.js 内置 zlib 替代 archiver
packages/studio/src/hooks/use-i18n.ts 新增 book.singleFile 国际化字段
packages/studio/src/pages/BookDetail.tsx 添加单文件复选框、File System Access API 保存对话框、EPUB 禁用逻辑

Test plan

  • pnpm typecheck passes
  • pnpm test passes
  • 手动验证:单文件导出正常,ZIP 分章导出可解压,EPUB 下复选框禁用

- Add "合并为单一文件" checkbox (default checked) for export page
- Unchecked exports each chapter as separate file in ZIP archive
- EPUB always exports as single file (checkbox disabled)
- Use File System Access API for browser save dialog
- Build ZIP with Node.js built-in zlib (deflateRaw), no external dependency
- File names use chapter titles instead of generic numbering

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@islanddddddd

Copy link
Copy Markdown
Author

哥你看看,给我合了吧,我寻思我这个是真有点用,改动还比较小

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant