feat: Add spinner
This commit is contained in:
1 parent
06e2e6cf1a
commit
4bfdda2e27
4 files changed
+110
-26
No files matched your search
+4
-24
@@ -7,6 +7,7 @@
|
||||
import Post from '$lib/components/lemmy/Post.svelte'
|
||||
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
||||
import { fly, scale } from 'svelte/transition'
|
||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
||||
|
||||
export let data
|
||||
</script>
|
||||
@@ -69,30 +70,9 @@
|
||||
<div class="hidden md:block">
|
||||
{#await data.streamed.site}
|
||||
<StickyCard>
|
||||
<div
|
||||
class="w-[64px] h-[64px] rounded-full bg-slate-200
|
||||
dark:bg-zinc-700 animate-pulse"
|
||||
/>
|
||||
<div
|
||||
class="w-32 h-3 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-64 h-3 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-36 mt-4 h-4 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-full h-4 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div
|
||||
class="w-24 h-4 bg-slate-200 dark:bg-zinc-700 animate-pulse
|
||||
rounded-md"
|
||||
/>
|
||||
<div class="h-64 grid place-items-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
</StickyCard>
|
||||
{:then site}
|
||||
<SiteCard site={site.site_view} />
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
import Badge from '$lib/components/ui/Badge.svelte'
|
||||
import { Bookmark, Icon, InformationCircle, Trash } from 'svelte-hero-icons'
|
||||
import Link from '$lib/components/input/Link.svelte'
|
||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -153,7 +154,9 @@
|
||||
</span>
|
||||
</div>
|
||||
{#await data.streamed.comments}
|
||||
<Loading />
|
||||
<div class="h-16">
|
||||
<Spinner width={36} />
|
||||
</div>
|
||||
{:then comments}
|
||||
{#if $user}
|
||||
<CommentForm
|
||||
|
||||
Reference in new issue
Block a user