feat(ui): show total archived chat count in ChatsModal title (#25872)

This commit is contained in:
G30 authored and GitHub committed 2026-06-17 02:57:27 +02:00
1 parent e031fadc35
commit dee07d8a30
5 files changed
+75 -3

No files matched your search

+15 -1
View File
@@ -36,6 +36,8 @@
export let showSearch = true;
export let readOnly = false;
export let count: number | null = null;
export let query = '';
export let orderBy = 'updated_at';
@@ -71,6 +73,7 @@
});
if (res) {
chatList = chatList?.filter((c) => c.id !== chatId) ?? null;
onDelete(chatId);
}
onUpdate();
@@ -90,7 +93,18 @@
<Modal size="lg" bind:show>
<div>
<div class=" flex justify-between dark:text-gray-300 px-5 pt-4 pb-1">
<div class=" text-lg font-medium self-center">{title}</div>
<div class="flex items-center gap-2 text-lg font-medium self-center">
<div>{title}</div>
{#if count !== null}
<div class="text-lg font-medium text-gray-500 dark:text-gray-500">
{count}
</div>
{:else if chatList}
<div class="text-lg font-medium text-gray-500 dark:text-gray-500">
{chatList.length}
</div>
{/if}
</div>
<button
class="self-center"
on:click={() => {