Update database schema and synchronization logic

- Add `useEffect` in `ScribeLeftBar` for handling book state changes.
- Extend `BooksSyncContext` with new properties and stricter typings.
- Refine `Repositories` to include `lastUpdate` handling for synchronization processes.
- Add comprehensive `fetchComplete*` repository methods for retrieving entity-specific sync data.
- Enhance offline logic for chapters, characters, locations, and world synchronization.
- Improve error handling across IPC handlers and repositories.
This commit is contained in:
natreex
2025-12-15 20:55:24 -05:00
parent bb331b5c22
commit 64c7cb6243
23 changed files with 1609 additions and 79 deletions

View File

@@ -163,12 +163,12 @@ export const bookTypes: SelectBoxProps[] = [
export default class Book {
constructor() {
}
static booksToSelectBox(books: BookProps[]): SelectBoxProps[] {
return books.map((book: BookProps) => {
static booksToSelectBox(books: SyncedBook[]): SelectBoxProps[] {
return books.map((book: SyncedBook):SelectBoxProps => {
return {
label: book.title,
value: book.bookId,
value: book.id,
}
});
}