This commit is contained in:
Timothy Jaeryang Baek 2025-05-25 01:59:48 +04:00
parent b2b1a21299
commit e65ac97c45
2 changed files with 7 additions and 1 deletions

View File

@ -105,6 +105,7 @@
bind:direction
title={$i18n.t("{{user}}'s Chats", { user: user.name })}
emptyPlaceholder={$i18n.t('No chats found for this user.')}
shareUrl={true}
{chatList}
{allChatsLoaded}
{chatListLoading}

View File

@ -25,6 +25,7 @@
export let title = 'Chats';
export let emptyPlaceholder = '';
export let shareUrl = false;
export let query = '';
@ -229,7 +230,11 @@
class=" w-full flex justify-between items-center rounded-lg text-sm py-2 px-3 hover:bg-gray-50 dark:hover:bg-gray-850"
draggable="false"
>
<a class=" basis-3/5" href="/c/{chat.id}" on:click={() => (show = false)}>
<a
class=" basis-3/5"
href={shareUrl ? `/s/${chat.id}` : `/c/${chat.id}`}
on:click={() => (show = false)}
>
<div class="text-ellipsis line-clamp-1 w-full">
{chat?.title}
</div>