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

View File

@@ -51,6 +51,11 @@
}
};
// Watch for modal visibility changes to notify opener
$: if (show && window.opener) {
window.opener.postMessage('loaded', '*');
}
onMount(() => {
window.addEventListener('message', handleMessage);
});

View File

@@ -835,9 +835,9 @@
loaded = true;
}
// Notify opener window that the app has loaded
if (window.opener ?? false) {
window.opener.postMessage('loaded', '*');
// Auto-show SyncStatsModal when opened with ?sync=true (from community)
if ((window.opener ?? false) && $page.url.searchParams.get('sync') === 'true') {
showSyncStatsModal = true;
}
return () => {