fix(electrobun): add 10s init timeout + splash loading fallback text

This commit is contained in:
Hibryda 2026-03-23 15:48:32 +01:00
parent e61473b025
commit 75391fb1e9
2 changed files with 4 additions and 2 deletions

View file

@ -343,7 +343,9 @@
}).catch(console.error),
];
Promise.allSettled(initTasks).then(() => {
// Timeout: if init hangs for 10s, force ready anyway
const timeout = new Promise(r => setTimeout(r, 10000));
Promise.race([Promise.allSettled(initTasks), timeout]).then(() => {
appReady = true;
for (const p of PROJECTS) trackProject(p.id);
});

View file

@ -42,7 +42,7 @@
<span class="dot"></span>
<span class="dot"></span>
</div>
<div class="loading-label">{t('splash.loading')}</div>
<div class="loading-label">{t('splash.loading') || 'Loading...'}</div>
</div>
</div>