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:
2
electron.d.ts
vendored
2
electron.d.ts
vendored
@@ -41,7 +41,7 @@ export interface IElectronAPI {
|
||||
offlinePinSet: (pin: string) => Promise<{ success: boolean; error?: string }>;
|
||||
offlinePinVerify: (pin: string) => Promise<{ success: boolean; userId?: string; error?: string }>;
|
||||
offlineModeSet: (enabled: boolean, syncInterval?: number) => Promise<{ success: boolean }>;
|
||||
offlineModeGet: () => Promise<{ enabled: boolean; syncInterval: number; hasPin: boolean }>;
|
||||
offlineModeGet: () => Promise<{ enabled: boolean; syncInterval: number; hasPin: boolean; lastUserId?: string }>;
|
||||
offlineSyncCheck: () => Promise<{ shouldSync: boolean; daysSinceSync?: number; syncInterval?: number }>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user