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:
@@ -40,7 +40,6 @@ fn get_session(session: &State<SessionState>) -> Result<(String, Lang), AppError
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct TombstoneRecord {
|
||||
pub table_name: String,
|
||||
pub entity_id: String,
|
||||
@@ -63,7 +62,6 @@ pub fn get_tombstones_since(since: i64, db: State<DbManager>, session: State<Ses
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct TombstoneInput {
|
||||
pub table_name: String,
|
||||
pub entity_id: String,
|
||||
|
||||
Reference in New Issue
Block a user