diff --git a/package.json b/package.json index 79425945..c388ce99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "photon-lemmy", - "version": "0.6.4", + "version": "0.6.5", "private": true, "scripts": { "dev": "vite dev", diff --git a/src/routes/profile/(local_user)/blocks/+page.svelte b/src/routes/profile/(local_user)/blocks/+page.svelte index f8f01026..80334785 100644 --- a/src/routes/profile/(local_user)/blocks/+page.svelte +++ b/src/routes/profile/(local_user)/blocks/+page.svelte @@ -7,8 +7,11 @@ import { getClient } from '$lib/lemmy.js' import { profile } from '$lib/auth.js' import Button from '$lib/components/input/Button.svelte' - import { Icon, Trash } from 'svelte-hero-icons' + import { Check, Icon, Trash } from 'svelte-hero-icons' import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte' + import { flip } from 'svelte/animate' + import { slide } from 'svelte/transition' + import Placeholder from '$lib/components/ui/Placeholder.svelte' // sveltekit doesn't feel like making types work right now export let data: PageData & { @@ -54,30 +57,72 @@ } -
- Users - unblockUser(i.detail)}> - {#each data.person_blocks as block} -
- - -
- {/each} -
-
+{#if data.community_blocks.length > 0 || data.person_blocks.length > 0} + {#if data.person_blocks.length > 0} +
+ Users + unblockUser(i.detail)}> + {#each data.person_blocks as block (block.target.id)} +
+ + +
+ {/each} +
+
+ {:else} + + + No user blocks +

+ Go to a user's profile and click "block" to stop seeing posts and + comments from them. +

+
+ {/if} -
- Communities - unblockCommunity(i.detail)}> - {#each data.community_blocks as block} -
- - -
- {/each} -
-
+ {#if data.community_blocks.length > 0} +
+ Communities + unblockCommunity(i.detail)}> + {#each data.community_blocks as block (block.community.id)} +
+ + +
+ {/each} +
+
+ {:else} + + + No community blocks +

+ Go to a community's page and click "block" to stop seeing submissions + from it. +

+
+ {/if} +{:else} +
+ + + No blocks +

+ Go to a community or user's page to stop seeing submissions from it. +

+
+
+{/if}