Update book handling and improve offline/online sync logic

- Enhanced the `BookProps` struct with updated field mappings for better API compatibility.
- Improved offline/online sync workflows in `BookList` by adding `localBook` property handling and new item count methods for segmented tracking of local/online items.
- Updated click handlers in `BookList` to fetch data based on connectivity state and prioritize local data when offline.
- Refactored the decryption and vault handling logic in Rust to remove obsolete legacy methods and standardize debug behavior.
- Introduced `ScribeShell` layout component with foundational logic for book/chapter syncing and offline queue handling.
- Added `init_panic_hook` to improve crash reporting during Rust app initialization.
This commit is contained in:
natreex
2026-04-05 11:36:12 -04:00
parent b9bc024e91
commit 2b6d4cc48b
6 changed files with 585 additions and 50 deletions

View File

@@ -35,15 +35,19 @@ pub struct BookToolsSettings {
#[serde(rename_all = "camelCase")]
pub struct BookProps {
pub book_id: String,
#[serde(rename = "type")]
pub book_type: String,
pub author_id: String,
pub title: String,
pub sub_title: String,
pub summary: String,
#[serde(rename = "serie")]
pub serie_id: i64,
pub series_id: Option<String>,
#[serde(rename = "publicationDate")]
pub desired_release_date: String,
pub desired_word_count: i64,
#[serde(rename = "totalWordCount")]
pub word_count: i64,
pub cover_image: String,
pub book_meta: Option<String>,