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 // Electron App
export const isApp = writable(false); export const isApp = writable(false);
export const appInfo = writable(null); export const appInfo = writable(null);
export const appData = writable(null);
// Frontend // Frontend
export const MODEL_DOWNLOAD_POOL = writable({}); export const MODEL_DOWNLOAD_POOL = writable({});

View File

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