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:
@@ -302,7 +302,7 @@ export default function useSyncSeries() {
|
||||
|
||||
serverSeriesResponse = serverResponse.series;
|
||||
|
||||
await tauri.applySeriesTombstones(serverResponse.tombstones as tauri.TombstoneRecord[]);
|
||||
await tauri.applySeriesTombstones((serverResponse.tombstones ?? []) as tauri.TombstoneRecord[]);
|
||||
} else {
|
||||
// No local DB but online - just get server series without tombstones
|
||||
const serverResponse: SyncedSeriesResponse = await apiPost<SyncedSeriesResponse>(
|
||||
|
||||
Reference in New Issue
Block a user