initial working version

This commit is contained in:
riqo 2021-06-16 08:42:47 -05:00
commit d963f7d8a8
23 changed files with 89 additions and 100 deletions

View file

@ -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);
}
}