diff --git a/src/lib/components/lemmy/community/CommunityCard.svelte b/src/lib/components/lemmy/community/CommunityCard.svelte index 5859d203..3cff2988 100644 --- a/src/lib/components/lemmy/community/CommunityCard.svelte +++ b/src/lib/components/lemmy/community/CommunityCard.svelte @@ -197,7 +197,7 @@ name={community_view.community.title} label="!{fullCommunityName( community_view.community.name, - community_view.community.actor_id + community_view.community.actor_id, )}" > diff --git a/src/lib/components/lemmy/community/CommunityLink.svelte b/src/lib/components/lemmy/community/CommunityLink.svelte index 6bffc308..bd2a1a46 100644 --- a/src/lib/components/lemmy/community/CommunityLink.svelte +++ b/src/lib/components/lemmy/community/CommunityLink.svelte @@ -9,6 +9,7 @@ export let name: boolean = true export let avatarSize: number = 24 export let showInstance: boolean = $userSettings.showInstances.community + export let displayName: boolean = true - {community.title} + + {displayName ? community.title : community.name} + {#if showInstance} User banner @@ -31,8 +31,7 @@ width={64} url={avatar} alt={name} - circle={false} - class="ring-4 rounded-3xl ring-slate-25 dark:ring-zinc-925" + class="ring-4 ring-slate-25 dark:ring-zinc-925 bg-slate-25 dark:bg-zinc-925" />
diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index b84121e3..1b81860c 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -359,7 +359,8 @@ "unblock": "Unblock", "blockInstance": "Block instance", "favorite": "Favorite", - "unfavorite": "Remove Favorite" + "unfavorite": "Remove Favorite", + "activeDay": "Active Today" } }, "admin": { diff --git a/src/routes/c/[name]/+page.svelte b/src/routes/c/[name]/+page.svelte index 318cf563..666e848c 100644 --- a/src/routes/c/[name]/+page.svelte +++ b/src/routes/c/[name]/+page.svelte @@ -15,9 +15,12 @@ import { ArrowRight, ChartBar, + Check, Cog6Tooth, EllipsisHorizontal, Icon, + InformationCircle, + Plus, XMark, } from 'svelte-hero-icons' import Placeholder from '$lib/components/ui/Placeholder.svelte' @@ -26,9 +29,14 @@ import { userSettings } from '$lib/settings.js' import { site } from '$lib/lemmy.js' import { postFeeds } from '$lib/lemmy/postfeed.js' + import EntityHeader from '$lib/components/ui/EntityHeader.svelte' + import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte' + import Subscribe from '../../communities/Subscribe.svelte' export let data + $: community = data.community.community_view + let sidebar: boolean = false onMount(() => { @@ -51,122 +59,155 @@ {#if sidebar} About -
+
{/if} -{#if data.community.community_view.community.banner} - -{/if} -
-
-
- -
-

- {data.community.community_view.community.title} -

- -
-
- {#if $profile?.user && $profile.user.moderates - .map((c) => c.community.id) - .includes(data.community.community_view.community.id)} +
+ + +
+ {#if $profile?.jwt} + - {/if} + + {/if} + + {#if $profile?.user && $profile.user.moderates + .map((c) => c.community.id) + .includes(community.community.id)} -
-
-
- -
- {#if data.community.community_view.blocked} - (sidebar = !sidebar)} > - - - {:else} - - {/if} - - - searchParam($page.url, 'page', p.detail.toString())} - on:cursor={(c) => { - searchParam($page.url, 'cursor', c.detail) - }} - > - - - {$t('routes.frontpage.footer', { - // @ts-ignore - users: $site?.site_view.counts.users_active_day ?? '??', - })} - - - + + +
+ +
+
+ {#if community.blocked} + + + + {:else} + + {/if} + + + searchParam($page.url, 'page', p.detail.toString())} + on:cursor={(c) => { + searchParam($page.url, 'cursor', c.detail) + }} + > + + + {$t('routes.frontpage.footer', { + // @ts-ignore + users: $site?.site_view.counts.users_active_day ?? '??', + })} + + +