feat: show message if loading is taking a while
This commit is contained in:
parent
cb214eff57
commit
ccb72a541b
2 changed files with 28 additions and 11 deletions
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,16 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { blur } from 'svelte/transition'
|
import { blur, fade } from 'svelte/transition'
|
||||||
|
|
||||||
import SvelteLogo from './SvelteLogo.svelte'
|
import SvelteLogo from './SvelteLogo.svelte'
|
||||||
|
import { onMount } from 'svelte'
|
||||||
|
|
||||||
|
let loadingStuck = false
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
loadingStuck = true
|
||||||
|
}, 3000)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -11,6 +20,14 @@
|
||||||
<div class="max-w-64">
|
<div class="max-w-64">
|
||||||
<SvelteLogo />
|
<SvelteLogo />
|
||||||
</div>
|
</div>
|
||||||
|
{#if loadingStuck}
|
||||||
|
<p
|
||||||
|
class="text-5xl text-slate-300 absolute bottom-20 animate-pulse"
|
||||||
|
transition:fade={{ duration: 300 }}
|
||||||
|
>
|
||||||
|
Loading 3D assets...please wait
|
||||||
|
</p>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
|
|
Loading…
Reference in a new issue