mirror of
https://github.com/open-webui/open-webui
synced 2025-02-01 15:24:25 +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
|
||||
export const isApp = writable(false);
|
||||
export const appInfo = writable(null);
|
||||
export const appData = writable(null);
|
||||
|
||||
// Frontend
|
||||
export const MODEL_DOWNLOAD_POOL = writable({});
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user