feat: single-community mode (PUBLIC_SINGLE_COMMUNITY)
For instances that are one community (thebitcoin.win): "/" reroutes to the community page, community browsing and explore lead back to it, community names/handles are hidden on posts and in the header, and create-post preselects the community. Unset, behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011c5BZVwWdVLrdQi9htmuth
This commit is contained in:
1 parent
6609371a28
commit
a9bf3497fe
11 files changed
+105
-27
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script lang="ts" module>
|
||||
import { SINGLE_COMMUNITY } from '$lib/app/single'
|
||||
import type { Community, Person, SubscribedType } from '$lib/api/types'
|
||||
import { profile } from '$lib/app/auth'
|
||||
import { t } from '$lib/app/i18n'
|
||||
@@ -197,13 +198,13 @@
|
||||
<header
|
||||
class={[
|
||||
'grid w-full meta',
|
||||
community ? 'grid-rows-2' : 'grid-rows-1 minimal',
|
||||
community && !SINGLE_COMMUNITY ? 'grid-rows-2' : 'grid-rows-1 minimal',
|
||||
'text-xs min-w-0 max-w-full text-slate-600 dark:text-zinc-400',
|
||||
]}
|
||||
class:compact={view == 'compact'}
|
||||
{style}
|
||||
>
|
||||
{#if showCommunity && community}
|
||||
{#if showCommunity && community && !SINGLE_COMMUNITY}
|
||||
<Popover>
|
||||
{#snippet target(attachment)}
|
||||
<button
|
||||
@@ -249,7 +250,7 @@
|
||||
{/snippet}
|
||||
</Popover>
|
||||
{/if}
|
||||
{#if showCommunity && community}
|
||||
{#if showCommunity && community && !SINGLE_COMMUNITY}
|
||||
<CommunityLink
|
||||
{community}
|
||||
style="grid-area: community;"
|
||||
|
||||
Reference in new issue
Block a user