mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-03 07:05:22 +00:00
refac
This commit is contained in:
parent
4a17a7c20a
commit
44faf00fac
1 changed files with 5 additions and 1 deletions
|
|
@ -26,12 +26,12 @@
|
||||||
const syncStats = async () => {
|
const syncStats = async () => {
|
||||||
if (window.opener) {
|
if (window.opener) {
|
||||||
window.opener.focus();
|
window.opener.focus();
|
||||||
|
window.opener.postMessage({ type: 'sync:start' }, '*');
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await getVersion(localStorage.token).catch(() => {
|
const res = await getVersion(localStorage.token).catch(() => {
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
window.opener.postMessage({ type: 'sync:version', data: res }, '*');
|
window.opener.postMessage({ type: 'sync:version', data: res }, '*');
|
||||||
}
|
}
|
||||||
|
|
@ -69,6 +69,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send sync complete message
|
||||||
|
if (window.opener) {
|
||||||
|
window.opener.postMessage({ type: 'sync:complete' }, '*');
|
||||||
|
}
|
||||||
loading = false;
|
loading = false;
|
||||||
completed = true;
|
completed = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue