Integrate session management, multilingual IPC handlers, and Book database operations
- Add `LocalSystem` with handlers for session retrieval (`userId`, `lang`) and error handling. - Extend IPC handlers to support multilingual operations (`fr`, `en`) and session data injection
This commit is contained in:
@@ -9,8 +9,12 @@ contextBridge.exposeInMainWorld('electron', {
|
||||
setToken: (token: string) => ipcRenderer.invoke('set-token', token),
|
||||
removeToken: () => ipcRenderer.invoke('remove-token'),
|
||||
|
||||
// Language management
|
||||
getLang: () => ipcRenderer.invoke('get-lang'),
|
||||
setLang: (lang: 'fr' | 'en') => ipcRenderer.invoke('set-lang', lang),
|
||||
|
||||
// Auth events
|
||||
loginSuccess: (token: string) => ipcRenderer.send('login-success', token),
|
||||
loginSuccess: (token: string, userId: string) => ipcRenderer.send('login-success', token, userId),
|
||||
logout: () => ipcRenderer.send('logout'),
|
||||
|
||||
// Database operations
|
||||
|
||||
Reference in New Issue
Block a user