misc: Add empty subscribed feed message
This commit is contained in:
1 parent
516d908cf7
commit
d42f8bc8af
4 files changed
+30
-1
No files matched your search
@@ -17,6 +17,7 @@
|
|||||||
GlobeAlt,
|
GlobeAlt,
|
||||||
Icon,
|
Icon,
|
||||||
Inbox,
|
Inbox,
|
||||||
|
MagnifyingGlass,
|
||||||
PencilSquare,
|
PencilSquare,
|
||||||
Plus,
|
Plus,
|
||||||
UserCircle,
|
UserCircle,
|
||||||
@@ -39,13 +40,24 @@
|
|||||||
<div class="flex flex-row gap-2 items-center mr-auto">
|
<div class="flex flex-row gap-2 items-center mr-auto">
|
||||||
<a href="/" class="flex flex-row items-center gap-2">
|
<a href="/" class="flex flex-row items-center gap-2">
|
||||||
<Logo width={40} />
|
<Logo width={40} />
|
||||||
|
<div class="flex flex-row items-center gap-2 max-[400px]:hidden">
|
||||||
<span class="opacity-30 text-xl">/</span>
|
<span class="opacity-30 text-xl">/</span>
|
||||||
<span class="text-sm font-bold">
|
<span class="text-sm font-bold">
|
||||||
{$instance}
|
{$instance}
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row gap-2 py-2 px-3">
|
<div class="flex flex-row gap-2 py-2 px-2">
|
||||||
|
<Button
|
||||||
|
href="/search"
|
||||||
|
label="Search"
|
||||||
|
class="max-sm:w-9 max-sm:h-8 max-sm:!p-0 items-center justify-center
|
||||||
|
dark:text-zinc-300 text-slate-700 hover:text-inherit"
|
||||||
|
>
|
||||||
|
<Icon src={MagnifyingGlass} mini width={16} slot="icon" />
|
||||||
|
<span class="hidden sm:inline">Search</span>
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
href="/communities"
|
href="/communities"
|
||||||
label="Communities"
|
label="Communities"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
||||||
import { authData } from '$lib/lemmy.js'
|
import { authData } from '$lib/lemmy.js'
|
||||||
import { userSettings } from '$lib/settings.js'
|
import { userSettings } from '$lib/settings.js'
|
||||||
|
import { ArchiveBox, Icon, Plus } from 'svelte-hero-icons'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
</script>
|
</script>
|
||||||
@@ -55,6 +56,20 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<section class="flex flex-col gap-4">
|
<section class="flex flex-col gap-4">
|
||||||
|
{#if data.posts.posts.length == 0}
|
||||||
|
{#if data.listingType == 'Subscribed'}
|
||||||
|
<div
|
||||||
|
class="text-slate-600 dark:text-zinc-400 flex flex-col justify-center items-center"
|
||||||
|
>
|
||||||
|
<Icon src={ArchiveBox} size="32" solid />
|
||||||
|
<h1 class="font-bold text-2xl">No posts</h1>
|
||||||
|
<Button href="/communities" class="mt-4">
|
||||||
|
<Icon src={Plus} size="16" mini slot="icon" />
|
||||||
|
<span>Follow some communities</span>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
{#each data.posts.posts as post, index (post.post.id)}
|
{#each data.posts.posts as post, index (post.post.id)}
|
||||||
<div in:fly={{ y: -8, opacity: 0, delay: index < 4 ? index * 100 : 0 }}>
|
<div in:fly={{ y: -8, opacity: 0, delay: index < 4 ? index * 100 : 0 }}>
|
||||||
<Post {post} />
|
<Post {post} />
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ export async function load({ url }) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return {
|
return {
|
||||||
|
sort: sort,
|
||||||
|
listingType: listingType,
|
||||||
posts: await getClient().getPosts({
|
posts: await getClient().getPosts({
|
||||||
limit: 20,
|
limit: 20,
|
||||||
page: page,
|
page: page,
|
||||||
|
|||||||
Whitespace-only changes.
Reference in new issue
Block a user