feat: show message if loading is taking a while

This commit is contained in:
Youwen Wu 2024-03-11 09:14:42 -07:00
parent cb214eff57
commit ccb72a541b
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 28 additions and 11 deletions

File diff suppressed because one or more lines are too long

View file

@ -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">