This commit is contained in:
Timothy Jaeryang Baek 2025-01-22 09:42:40 -08:00
parent ed7db1dd41
commit c2b5200663
2 changed files with 13 additions and 5 deletions

View File

@ -14,6 +14,7 @@ export const user: Writable<SessionUser | undefined> = writable(undefined);
// Electron App
export const isApp = writable(false);
export const appInfo = writable(null);
export const appData = writable(null);
// Frontend
export const MODEL_DOWNLOAD_POOL = writable({});

View File

@ -202,14 +202,21 @@
onMount(async () => {
if (window?.electronAPI) {
const res = await window.electronAPI.send({
type: 'info'
const info = await window.electronAPI.send({
type: 'app:info'
});
if (res) {
if (info) {
isApp.set(true);
appInfo.set(res);
console.log(res);
appInfo.set(info);
const data = await window.electronAPI.send({
type: 'app:data'
});
if (data) {
appData.set(data);
}
}
}