initial working version
This commit is contained in:
parent
0a3c9f71d8
commit
d963f7d8a8
23 changed files with 89 additions and 100 deletions
10
src/main.ts
10
src/main.ts
|
|
@ -12,7 +12,7 @@
|
|||
import useIpc from "@/ipc/index";
|
||||
import { accountAuth } from "./account";
|
||||
import { launchSession } from "./session";
|
||||
import ipcEmit from "./composables/emitter";
|
||||
import { ipcEmit } from "./composables/useEmitter";
|
||||
import createWindow from "./window";
|
||||
|
||||
let authState: AuthState | null;
|
||||
|
|
@ -31,8 +31,12 @@ export default async function main() {
|
|||
console.log('AUTH:', e);
|
||||
authState = null;
|
||||
} finally {
|
||||
if (authState) launchSession(authState.token as string);
|
||||
ipcEmit("set-profile", authState?.profile);
|
||||
let profile = null;
|
||||
if (authState) {
|
||||
launchSession(authState.token as string);
|
||||
profile = authState.profile;
|
||||
}
|
||||
ipcEmit("set-profile", profile);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue