This commit is contained in:
Timothy Jaeryang Baek
2026-01-02 16:56:13 +04:00
parent f0829ba6e6
commit ccd3295a5d
2 changed files with 8 additions and 3 deletions
@@ -51,6 +51,11 @@
} }
}; };
// Watch for modal visibility changes to notify opener
$: if (show && window.opener) {
window.opener.postMessage('loaded', '*');
}
onMount(() => { onMount(() => {
window.addEventListener('message', handleMessage); window.addEventListener('message', handleMessage);
}); });
+3 -3
View File
@@ -835,9 +835,9 @@
loaded = true; loaded = true;
} }
// Notify opener window that the app has loaded // Auto-show SyncStatsModal when opened with ?sync=true (from community)
if (window.opener ?? false) { if ((window.opener ?? false) && $page.url.searchParams.get('sync') === 'true') {
window.opener.postMessage('loaded', '*'); showSyncStatsModal = true;
} }
return () => { return () => {