Add error handling, enhance syncing, and refactor deletion logic
- Introduce new error messages for syncing and book deletion in `en.json`. - Update `DeleteBook` to support local-only deletion and synced book management. - Refine offline/online behavior with `deleteLocalToo` checkbox and update related state handling. - Extend repository and IPC methods to handle optional IDs for updates. - Add `SyncQueueContext` for queueing offline changes and improving synchronization workflows. - Enhance refined text generation logic in `DraftCompanion` and `GhostWriter` components. - Replace PUT with PATCH for world updates to align with API expectations. - Streamline `AlertBox` by integrating dynamic translation keys for deletion prompts.
This commit is contained in:
@@ -151,7 +151,12 @@
|
||||
"serverOnly": "Server only",
|
||||
"toSyncFromServer": "Download from server",
|
||||
"toSyncToServer": "Upload to server",
|
||||
"sync": "Sync"
|
||||
"sync": "Sync",
|
||||
"uploadError": "Error uploading book.",
|
||||
"downloadError": "Error downloading book.",
|
||||
"syncFromServerError": "Error syncing from server.",
|
||||
"syncToServerError": "Error syncing to server.",
|
||||
"refreshError": "Error refreshing books."
|
||||
},
|
||||
"scribeTopBar": {
|
||||
"logoAlt": "Logo",
|
||||
@@ -873,7 +878,11 @@
|
||||
"lastChapterError": "Error retrieving last chapter",
|
||||
"localDataError": "Unable to load local data",
|
||||
"encryptionKeyError": "Encryption key not found",
|
||||
"offlineModeError": "Error initializing offline mode"
|
||||
"offlineModeError": "Error initializing offline mode",
|
||||
"offlineInitError": "Error initializing offline mode",
|
||||
"syncError": "Error syncing data",
|
||||
"dbInitError": "Error initializing local database",
|
||||
"offlineError": "Error checking offline mode"
|
||||
}
|
||||
},
|
||||
"shortStoryGenerator": {
|
||||
@@ -975,5 +984,14 @@
|
||||
"setupFailed": "Error configuring PIN"
|
||||
}
|
||||
}
|
||||
},
|
||||
"deleteBook": {
|
||||
"title": "Delete book",
|
||||
"message": "You are about to permanently delete your book.",
|
||||
"confirm": "Delete",
|
||||
"cancel": "Cancel",
|
||||
"deleteLocalToo": "Also delete local version",
|
||||
"deleteLocalWarning": "Warning: This action will delete the book from the server AND your device. This action is irreversible.",
|
||||
"errorUnknown": "An unknown error occurred while deleting the book."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user