This commit is contained in:
Timothy Jaeryang Baek 2025-12-26 15:46:32 +04:00
parent 4a17a7c20a
commit 44faf00fac

View file

@ -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;
}; };