diff --git a/src/lib/components/lemmy/SiteCard.svelte b/src/lib/components/lemmy/SiteCard.svelte
index e5fd3a7e..17bd15c7 100644
--- a/src/lib/components/lemmy/SiteCard.svelte
+++ b/src/lib/components/lemmy/SiteCard.svelte
@@ -22,6 +22,8 @@
} from 'svelte-hero-icons'
import Expandable from '../ui/Expandable.svelte'
import LabelStat from '../ui/LabelStat.svelte'
+ import ItemList from './generic/ItemList.svelte'
+ import { userLink } from '$lib/lemmy/generic'
export let site: SiteView
export let taglines: Tagline[] | undefined = undefined
@@ -111,28 +113,15 @@
Admins
-
- {#each admins as admin}
-
-
-
-
- {admin.person.name}
-
- {/each}
-
+ ({
+ id: a.person.id,
+ name: a.person.name,
+ url: userLink(a.person),
+ avatar: a.person.avatar,
+ instance: new URL(a.person.actor_id).hostname,
+ }))}
+ />
{/if}
diff --git a/src/lib/components/lemmy/generic/ItemList.svelte b/src/lib/components/lemmy/generic/ItemList.svelte
new file mode 100644
index 00000000..c45e41e4
--- /dev/null
+++ b/src/lib/components/lemmy/generic/ItemList.svelte
@@ -0,0 +1,47 @@
+
+
+{#each items.sort((a, b) => a.name.localeCompare(b.name)) as item (item.id)}
+
+
+
+{/each}
diff --git a/src/lib/components/ui/sidebar/CommunityList.svelte b/src/lib/components/ui/sidebar/CommunityList.svelte
index 65c2cb00..5b32b068 100644
--- a/src/lib/components/ui/sidebar/CommunityList.svelte
+++ b/src/lib/components/ui/sidebar/CommunityList.svelte
@@ -26,7 +26,7 @@
url={follow.icon}
alt={follow.name}
title={follow.title}
- width={20}
+ width={24}
slot="prefix"
/>
diff --git a/src/lib/lemmy/generic.ts b/src/lib/lemmy/generic.ts
new file mode 100644
index 00000000..4eecef56
--- /dev/null
+++ b/src/lib/lemmy/generic.ts
@@ -0,0 +1,8 @@
+import { fullCommunityName } from "$lib/util";
+import type { Community, Person } from "lemmy-js-client";
+
+export const communityLink = (community: Community, prefix: string = '') =>
+ `${prefix}/c/${fullCommunityName(community.name, community.actor_id)}`
+
+export const userLink = (person: Person, prefix: string = '') =>
+ `${prefix}/c/${person.name}@${new URL(person.actor_id).hostname}`
\ No newline at end of file
diff --git a/src/routes/u/[name]/+page.svelte b/src/routes/u/[name]/+page.svelte
index 606c33a3..8a281807 100644
--- a/src/routes/u/[name]/+page.svelte
+++ b/src/routes/u/[name]/+page.svelte
@@ -41,6 +41,9 @@
import PrivateMessageModal from '$lib/components/lemmy/modal/PrivateMessageModal.svelte'
import LabelStat from '$lib/components/ui/LabelStat.svelte'
import PostBody from '$lib/components/lemmy/post/PostBody.svelte'
+ import Expandable from '$lib/components/ui/Expandable.svelte'
+ import { communityLink } from '$lib/lemmy/generic.js'
+ import ItemList from '$lib/components/lemmy/generic/ItemList.svelte'
export let data
@@ -243,32 +246,24 @@
/>
{#if (data.moderates ?? []).length > 0}
-
-
Moderates
-
- {#each data.moderates as moderator}
-
-
-
-
- {moderator.community.title}
-
- {/each}
-
-
+
+
+
+ Moderates
+
+ ({
+ id: m.community.id,
+ name: m.community.title,
+ url: communityLink(m.community),
+ avatar: m.community.icon,
+ instance: new URL(m.community.actor_id).hostname,
+ }))}
+ />
+
{/if}
{#if $profile?.user && $profile.jwt && data.person_view.person.id != $profile.user.local_user_view.person.id}