Introduce local fallback for book creation and improve error handling

- Added support for creating books locally when the cloud limit is reached.
- Enhanced error handling in `AddNewBookForm` with `ApiError` and fallback logic for local book creation.
- Implemented `BookTypeLimit` to manage type-specific book limits with visual indicators in `BookList`.
- Refactored `TombstoneRecord` to standardize naming conventions for better API compatibility.
- Updated `useSyncSeries` and `useSyncBooks` to handle empty tombstones gracefully.
- Updated locales with new translations for fallback and error messaging.
This commit is contained in:
natreex
2026-03-31 09:18:11 -04:00
parent acacd95f38
commit b9bc024e91
10 changed files with 191 additions and 47 deletions

View File

@@ -216,7 +216,7 @@ export default function useSyncBooks() {
serverBooksResponse = serverResponse.books;
await tauri.applyBookTombstones(serverResponse.tombstones as tauri.TombstoneRecord[]);
await tauri.applyBookTombstones((serverResponse.tombstones ?? []) as tauri.TombstoneRecord[]);
} else {
// No local DB but online - just get server books without tombstones
const serverResponse: SyncedBooksResponse = await apiPost<SyncedBooksResponse>(