fix(electrobun): add 10s init timeout + splash loading fallback text
This commit is contained in:
parent
e61473b025
commit
75391fb1e9
2 changed files with 4 additions and 2 deletions
|
|
@ -343,7 +343,9 @@
|
||||||
}).catch(console.error),
|
}).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;
|
appReady = true;
|
||||||
for (const p of PROJECTS) trackProject(p.id);
|
for (const p of PROJECTS) trackProject(p.id);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<span class="dot"></span>
|
<span class="dot"></span>
|
||||||
<span class="dot"></span>
|
<span class="dot"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="loading-label">{t('splash.loading')}</div>
|
<div class="loading-label">{t('splash.loading') || 'Loading...'}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue