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.
This commit is contained in:
16
electron.d.ts
vendored
Normal file
16
electron.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export interface IElectronAPI {
|
||||
platform: NodeJS.Platform;
|
||||
getToken: () => Promise<string | null>;
|
||||
setToken: (token: string) => Promise<boolean>;
|
||||
removeToken: () => Promise<boolean>;
|
||||
loginSuccess: (token: string) => void;
|
||||
logout: () => void;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
electron: IElectronAPI;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user