mirror of
https://github.com/Aminark/legado-ios.git
synced 2026-10-24 21:01:22 +08:00
feat: 支持 EPUB 阅读并改善规则兼容与阅读稳定性
支持 EPUB 2/3 导入、目录、封面和章节插图,保留本地书管理与阅读进度。 修复 JSON 模板、动态替换与请求参数兼容,以及 RSS 翻页和连续滚动定位。 更新编辑器工具栏和回归测试,发布版本为 0.1.12(build 18)。
This commit is contained in:
@@ -18,6 +18,7 @@ struct ReaderView: View {
|
||||
@StateObject private var speech = ReaderSpeechController()
|
||||
@State private var showsTableOfContents = false
|
||||
@State private var showsBookmarks = false
|
||||
@State private var illustrationChapter: BookChapter?
|
||||
@State private var showsAutoReadControls = false
|
||||
@State private var showsStyleControls = false
|
||||
@State private var isAutoReading = false
|
||||
@@ -257,6 +258,9 @@ struct ReaderView: View {
|
||||
}
|
||||
.sheet(isPresented: $showsTableOfContents) { tableOfContents }
|
||||
.sheet(isPresented: $showsBookmarks) { bookmarksSheet }
|
||||
.sheet(item: $illustrationChapter) { chapter in
|
||||
EPUBIllustrationsView(book: book, chapter: chapter)
|
||||
}
|
||||
.sheet(isPresented: $showsAutoReadControls) { autoReadControls }
|
||||
.sheet(isPresented: $showsStyleControls) { styleControls }
|
||||
.sheet(isPresented: $showsContentSearch) { contentSearchSheet }
|
||||
@@ -698,6 +702,7 @@ struct ReaderView: View {
|
||||
|| showsReaderMenu
|
||||
|| showsTableOfContents
|
||||
|| showsBookmarks
|
||||
|| illustrationChapter != nil
|
||||
|| showsAutoReadControls
|
||||
|| showsStyleControls
|
||||
|| showsContentSearch
|
||||
@@ -834,6 +839,12 @@ struct ReaderView: View {
|
||||
showsReaderMenu = false
|
||||
showsContentSearch = true
|
||||
}
|
||||
if book.origin == "local", URL(string: book.bookUrl)?.pathExtension.lowercased() == "epub" {
|
||||
Button("本章插图", systemImage: "photo.on.rectangle") {
|
||||
showsReaderMenu = false
|
||||
illustrationChapter = model.currentChapter
|
||||
}
|
||||
}
|
||||
Button("书签列表", systemImage: "bookmark") {
|
||||
showsReaderMenu = false
|
||||
showsBookmarks = true
|
||||
@@ -1575,7 +1586,7 @@ struct ReaderView: View {
|
||||
Text("正文")
|
||||
} footer: {
|
||||
if !model.canEditContent {
|
||||
Text("本地 TXT 直接来自原文件;为避免破坏章节偏移,本章编辑与网络刷新仅对网络书籍开放。")
|
||||
Text("本地 TXT / EPUB 直接读取原文件。本章编辑与网络刷新仅对网络书籍开放。")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user