Repository navigation
feat: 新增数据管理页并支持按书清理 - #55
Merged
Merged
Conversation
按数据目录划分占用,并按书籍清理图片、听书缓存、翻译缓存和迁移残留。 Co-authored-by: zilorn <[email protected]>
设置页只保留入口;新页面展示分类占用,并提供备份、听书缓存、进度重置和按书清理。 Co-authored-by: zilorn <[email protected]>
zilorn
marked this pull request as ready for review
November 8, 2026 09:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题 / Problem
Fixes #54
设置页把备份、听书缓存和重置阅读进度放在同一个数据区块里,没有独立的数据管理页面,也看不到应用占用了多少磁盘,更不能按书籍清理图片、听书缓存、翻译缓存和迁移残留。
改动后的行为 / Resulting behavior
手机与桌面共用同一套页面:
/data。books.sqlite3。截图在本地浏览器里核对过,未写入仓库。
验证 / Validation
pnpm exec tsc --noEmit通过。pnpm run i18n:check通过。pnpm build通过。cargo +stable test -p readerx --lib storage_usage通过(3 个测试:占用分区与符号链接、迁移残留与未迁移文件、图片归属与翻译缓存)。http://127.0.0.1:1420用无头 Chrome 走通设置 → 数据管理。空书库下看到占用空态与清理空态;打开并取消重置进度确认框;从数据管理进入备份页和听书缓存页后能返回。约 390px 与 1200px 宽度都能完整显示该页。未在真实 Android / 桌面 Tauri 上核对磁盘数字、文件选择器和实际删除。浏览器没有数据目录,所以没有点击全选、反选和带书籍的清理确认;这部分由 Rust 测试覆盖归属与删除结果。
数据与兼容性 / Data and compatibility
没有新的数据库 schema 或
user_version。查看占用不写盘。清理只删除勾选书籍的图片缓存、听书音频目录、翻译正文缓存,以及*.migrated残留。书籍正文、书签、批注、阅读进度、译名表和翻译配置保留。未迁移的待导入 JSON 不删。共享图片在仍有未选中书籍引用时保留。删除图片后书籍里的本地引用仍在,下次读取会清掉失效引用并走现有的重新下载路径。提交前检查 / Checklist