9 Commits

Author SHA1 Message Date
natreex
060693f152 Add OAuth login support and streamline authentication flows
- Introduced `oauthLogin` method in `electron/preload.ts` and backend IPC handlers for OAuth via `BrowserWindow`.
- Replaced web-based OAuth redirection with Electron-specific implementation for Google, Facebook, and Apple.
- Refactored `SocialForm.tsx` to handle OAuth login success and token management via Electron.
- Updated `User`, `QuillSense`, and context methods to include `quill-trial` subscriptions and extended login logic.
- Cleaned up code, removed unused imports, and improved error handling for authentication scenarios.
2026-01-08 11:03:19 -05:00
natreex
736b9a3609 Add openExternal IPC handler and integrate with UI components
- Introduce `openExternal` IPC handler in `electron/main.ts` for opening external links via the default browser or native app.
- Update typings in `electron.d.ts` and `preload.ts` to include `openExternal`.
- Refactor `ComposerRightBar` and `LeftBar` components to leverage `electron.openExternal` for external link actions (e.g., Facebook, Discord).
- Add offline mode logic to filter navigation options in `ComposerRightBar` and `LeftBar`.
- Enhance footer bar to display book titles when chapters are unavailable.
2025-11-26 17:44:55 -05:00
natreex
ac95e00127 Integrate offline support and improve error handling across app
- Add `OfflineContext` to manage offline state and interactions within components.
- Refactor session logic in `ScribeControllerBar` and `page.tsx` to handle offline scenarios (e.g., check connectivity before enabling GPT features).
- Enhance offline PIN setup and verification with better flow and error messaging.
- Optimize database IPC handlers to initialize and sync data in offline mode.
- Refactor code to clean up redundant logs and ensure stricter typings.
- Improve consistency and structure in handling online and offline operations for smoother user experience.
2025-11-26 15:25:53 -05:00
natreex
9e51cc93a8 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.
2025-11-19 22:01:24 -05:00
natreex
f85c2d2269 Add offline mode support with PIN configuration and management
- Introduce `OfflinePinSetup` component for users to configure secure offline access.
- Add new `AIUsageContext` and extend `OfflineProvider` for offline-related state management.
- Implement offline login functionality in `electron/main.ts` with PIN verification and fallback support.
- Enhance IPC handlers to manage offline mode data, PIN setup, and synchronization.
- Update localization files (`en.json`, `fr.json`) with offline mode and PIN-related strings.
- Add `bcrypt` and `@types/bcrypt` dependencies for secure PIN hashing and validation.
- Refactor login and session management to handle offline mode scenarios with improved error handling and flow.
2025-11-19 19:58:55 -05:00
natreex
dde4683c38 Migrate from electron-store to OS-level secure storage (getSecureStorage)
- Replace `electron-store` with OS-level encrypted storage for secure token, userId, and language management in `LocalSystem` and `keyManager`.
- Add `init-user` IPC handler to initialize user data and manage encryption keys.
- Update login process to handle encrypted storage saving with fallback for macOS issues.
- Add offline warning component to `login/page.tsx` to handle first-time sync requirements.
- Remove `electron-store` and associated dependencies from `package.json` and `package-lock.json`.
2025-11-19 19:10:12 -05:00
natreex
d018e75be4 Remove DataService and OfflineDataService, refactor book and character operations to use streamlined handlers in LocalSystem
- Delete `data.service.ts` and `offline-data.service.ts`, consolidating functionality into `LocalSystem`.
- Refactor book, character, and conversation operations to adopt unified, multilingual, and session-enabled IPC handlers in `LocalSystem`.
- Simplify redundant legacy methods, enhancing maintainability and consistency.
2025-11-18 21:02:38 -05:00
natreex
71067c6fa8 Integrate local database management and IPC handlers into Electron
- Add comprehensive IPC handlers for database operations like books, chapters, characters, and conversations.
- Implement local database initialization and user data encryption.
- Update preload script paths for consistent environment handling.
- Modify `page.tsx` to initialize local database within Electron environment.
- Add new dependencies including `node-sqlite3-wasm` and `electron-rebuild`.
2025-11-17 07:46:20 -05:00
natreex
de03dedaf0 Add Electron main process with token management and navigation setup
- Implement main and login windows for Electron.
- Integrate `electron-store` for secure token storage and management.
- Setup IPC handlers for authentication.
- Update dependencies to support Electron, including `vite`, `react-router-dom`, and plugins.
2025-11-16 13:55:08 -05:00