Remove SyncService and introduce context-based offline mode and state management

- Delete `SyncService` and its associated bidirectional synchronization logic.
- Add multiple context providers (`OfflineProvider`, `AlertProvider`, `LangContext`, `UserContext`, `SessionContext`, `WorldContext`, `SettingBookContext`) for contextual state management.
- Implement `SecureStorage` for OS-level secure data encryption and replace dependency on `SyncService` synchronization.
- Update localization files (`en.json`, `fr.json`) with offline mode and error-related strings.
This commit is contained in:
natreex
2025-11-19 22:01:24 -05:00
parent f85c2d2269
commit 9e51cc93a8
20 changed files with 961 additions and 484 deletions

12
context/SettingBookContext.ts Executable file
View File

@@ -0,0 +1,12 @@
import {Context, createContext, Dispatch, SetStateAction} from "react";
export interface SettingBookContextProps {
bookSettingId: string;
setBookSettingId: Dispatch<SetStateAction<string>>
}
export const SettingBookContext: Context<SettingBookContextProps> = createContext<SettingBookContextProps>({
bookSettingId: '',
setBookSettingId: (): void => {
}
})