mirror of
https://github.com/open-webui/open-webui
synced 2025-02-01 23:34:29 +00:00
refac
This commit is contained in:
parent
ed7db1dd41
commit
c2b5200663
@ -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({});
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user