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.
This commit is contained in:
natreex
2025-11-26 17:44:55 -05:00
parent ac95e00127
commit 736b9a3609
6 changed files with 37 additions and 18 deletions

3
electron.d.ts vendored
View File

@@ -37,6 +37,9 @@ export interface IElectronAPI {
// Database initialization (shortcut for convenience)
dbInitialize: (userId: string, encryptionKey: string) => Promise<boolean>;
// Open external links (browser/native app)
openExternal: (url: string) => Promise<void>;
// Offline mode management
offlinePinSet: (pin: string) => Promise<{ success: boolean; error?: string }>;
offlinePinVerify: (pin: string) => Promise<{ success: boolean; userId?: string; error?: string }>;