This commit is contained in:
Timothy Jaeryang Baek 2025-12-01 13:34:57 -05:00
parent 51621ba91a
commit f5e8d4d5a0
2 changed files with 32 additions and 7 deletions

View file

@ -188,7 +188,7 @@ class UserIdNameResponse(BaseModel):
name: str name: str
class UserIdNameStatusResponse(BaseModel): class UserIdNameStatusResponse(UserStatus):
id: str id: str
name: str name: str
is_active: Optional[bool] = None is_active: Optional[bool] = None

View file

@ -15,6 +15,7 @@
import Hashtag from '$lib/components/icons/Hashtag.svelte'; import Hashtag from '$lib/components/icons/Hashtag.svelte';
import Users from '$lib/components/icons/Users.svelte'; import Users from '$lib/components/icons/Users.svelte';
import XMark from '$lib/components/icons/XMark.svelte'; import XMark from '$lib/components/icons/XMark.svelte';
import Emoji from '$lib/components/common/Emoji.svelte';
export let onUpdate: Function = () => {}; export let onUpdate: Function = () => {};
@ -131,14 +132,38 @@
{/if} {/if}
</div> </div>
<div class=" text-left self-center overflow-hidden w-full line-clamp-1 flex-1 pr-1"> <div
class=" text-left self-center overflow-hidden w-full line-clamp-1 flex-1 pr-1 flex items-center gap-2.5"
>
{#if channel?.name} {#if channel?.name}
<span>
{channel.name} {channel.name}
</span>
{:else} {:else}
<span class="shrink-0">
{channel?.users {channel?.users
?.filter((u) => u.id !== $user?.id) ?.filter((u) => u.id !== $user?.id)
.map((u) => u.name) .map((u) => u.name)
.join(', ')} .join(', ')}
</span>
{#if channel?.users?.length === 2}
{@const dmUser = channel.users.find((u) => u.id !== $user?.id)}
{#if dmUser?.status_emoji || dmUser?.status_message}
<span class="flex gap-1.5">
{#if dmUser?.status_emoji}
<div class=" self-center shrink-0">
<Emoji className="size-3.5" shortCode={dmUser?.status_emoji} />
</div>
{/if}
<div class="line-clamp-1 italic">
{dmUser?.status_message}
</div>
</span>
{/if}
{/if}
{/if} {/if}
</div> </div>
</div> </div>