This commit is contained in:
Timothy Jaeryang Baek 2025-07-13 03:43:30 +04:00
parent 57156065e3
commit 2b9e30a107
3 changed files with 13 additions and 6 deletions

View file

@ -1990,7 +1990,6 @@
history: history,
messages: createMessagesList(history, history.currentId),
tags: [],
timestamp: Date.now()
},
$selectedFolder?.id
@ -1999,10 +1998,12 @@
_chatId = chat.id;
await chatId.set(_chatId);
window.history.replaceState(history.state, '', `/c/${_chatId}`);
await tick();
await chats.set(await getChatList(localStorage.token, $currentChatPage));
currentChatPage.set(1);
window.history.replaceState(history.state, '', `/c/${_chatId}`);
} else {
_chatId = 'local';
await chatId.set('local');

View file

@ -362,6 +362,12 @@
}
});
chats.subscribe((value) => {
if ($selectedFolder) {
initFolders();
}
});
await initChannels();
await initChatList();

View file

@ -301,7 +301,7 @@
<div
class=" w-full flex justify-between rounded-lg px-[11px] py-[6px] {id === $chatId ||
confirmEdit
? 'bg-gray-200 dark:bg-gray-900'
? 'bg-gray-100 dark:bg-gray-900'
: selected
? 'bg-gray-100 dark:bg-gray-950'
: 'group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis relative {generating
@ -347,7 +347,7 @@
<a
class=" w-full flex justify-between rounded-lg px-[11px] py-[6px] {id === $chatId ||
confirmEdit
? 'bg-gray-200 dark:bg-gray-900'
? 'bg-gray-100 dark:bg-gray-900'
: selected
? 'bg-gray-100 dark:bg-gray-950'
: ' group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis"
@ -387,7 +387,7 @@
<div
class="
{id === $chatId || confirmEdit
? 'from-gray-200 dark:from-gray-900'
? 'from-gray-100 dark:from-gray-900'
: selected
? 'from-gray-100 dark:from-gray-950'
: 'invisible group-hover:visible from-gray-100 dark:from-gray-950'}