Versie 0.3.2
This commit is contained in:
1 parent
e77d8fd373
commit
1cf6eeed29
16 files changed
+551
-44
No files matched your search
+5
-5
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:a433ae61cf1d51dd5a396f13922a2aaa329bfea96e00b35d9456a671a84c5e04
|
||||
// Generated, do not edit. sha256:45c5f1058c49379b8b6b1e8f53d554bf4f5826219c9349649a60020eb36c8064
|
||||
import { CONFIG } from '../../shared/config.js';
|
||||
import { t } from '../i18n/index.js';
|
||||
|
||||
@@ -24,10 +24,10 @@ let typeTimer = 0;
|
||||
|
||||
const reducedMotion = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
function fadeOut(splash) {
|
||||
function fadeOut(splash, after = () => {}) {
|
||||
splash.style.transitionDuration = `${CONFIG.SPLASH.FADE_MS}ms`;
|
||||
splash.classList.add('is-done');
|
||||
setTimeout(() => reset(splash), CONFIG.SPLASH.FADE_MS + 50);
|
||||
setTimeout(() => { reset(splash); after(); }, CONFIG.SPLASH.FADE_MS + 50);
|
||||
}
|
||||
|
||||
function reset(splash) {
|
||||
@@ -41,9 +41,9 @@ function reset(splash) {
|
||||
|
||||
export function finishSplash() {
|
||||
const splash = document.getElementById('splash');
|
||||
if (!splash || document.documentElement.dataset.splash !== 'on') return;
|
||||
if (!splash || document.documentElement.dataset.splash !== 'on') return Promise.resolve();
|
||||
const wait = Math.max(0, CONFIG.SPLASH.MIN_MS - (performance.now() - bootT0));
|
||||
setTimeout(() => fadeOut(splash), wait);
|
||||
return new Promise(resolve => setTimeout(() => fadeOut(splash, resolve), wait));
|
||||
}
|
||||
|
||||
function showManualSplash() {
|
||||
|
||||
Reference in new issue
Block a user