mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 20:07:49 +01:00
refac
This commit is contained in:
@@ -1990,7 +1990,6 @@
|
|||||||
history: history,
|
history: history,
|
||||||
messages: createMessagesList(history, history.currentId),
|
messages: createMessagesList(history, history.currentId),
|
||||||
tags: [],
|
tags: [],
|
||||||
|
|
||||||
timestamp: Date.now()
|
timestamp: Date.now()
|
||||||
},
|
},
|
||||||
$selectedFolder?.id
|
$selectedFolder?.id
|
||||||
@@ -1999,10 +1998,12 @@
|
|||||||
_chatId = chat.id;
|
_chatId = chat.id;
|
||||||
await chatId.set(_chatId);
|
await chatId.set(_chatId);
|
||||||
|
|
||||||
|
window.history.replaceState(history.state, '', `/c/${_chatId}`);
|
||||||
|
|
||||||
|
await tick();
|
||||||
|
|
||||||
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
||||||
currentChatPage.set(1);
|
currentChatPage.set(1);
|
||||||
|
|
||||||
window.history.replaceState(history.state, '', `/c/${_chatId}`);
|
|
||||||
} else {
|
} else {
|
||||||
_chatId = 'local';
|
_chatId = 'local';
|
||||||
await chatId.set('local');
|
await chatId.set('local');
|
||||||
|
|||||||
@@ -362,6 +362,12 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
chats.subscribe((value) => {
|
||||||
|
if ($selectedFolder) {
|
||||||
|
initFolders();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
await initChannels();
|
await initChannels();
|
||||||
await initChatList();
|
await initChatList();
|
||||||
|
|
||||||
|
|||||||
@@ -301,7 +301,7 @@
|
|||||||
<div
|
<div
|
||||||
class=" w-full flex justify-between rounded-lg px-[11px] py-[6px] {id === $chatId ||
|
class=" w-full flex justify-between rounded-lg px-[11px] py-[6px] {id === $chatId ||
|
||||||
confirmEdit
|
confirmEdit
|
||||||
? 'bg-gray-200 dark:bg-gray-900'
|
? 'bg-gray-100 dark:bg-gray-900'
|
||||||
: selected
|
: selected
|
||||||
? 'bg-gray-100 dark:bg-gray-950'
|
? 'bg-gray-100 dark:bg-gray-950'
|
||||||
: 'group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis relative {generating
|
: 'group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis relative {generating
|
||||||
@@ -347,7 +347,7 @@
|
|||||||
<a
|
<a
|
||||||
class=" w-full flex justify-between rounded-lg px-[11px] py-[6px] {id === $chatId ||
|
class=" w-full flex justify-between rounded-lg px-[11px] py-[6px] {id === $chatId ||
|
||||||
confirmEdit
|
confirmEdit
|
||||||
? 'bg-gray-200 dark:bg-gray-900'
|
? 'bg-gray-100 dark:bg-gray-900'
|
||||||
: selected
|
: selected
|
||||||
? 'bg-gray-100 dark:bg-gray-950'
|
? 'bg-gray-100 dark:bg-gray-950'
|
||||||
: ' group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis"
|
: ' group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis"
|
||||||
@@ -387,7 +387,7 @@
|
|||||||
<div
|
<div
|
||||||
class="
|
class="
|
||||||
{id === $chatId || confirmEdit
|
{id === $chatId || confirmEdit
|
||||||
? 'from-gray-200 dark:from-gray-900'
|
? 'from-gray-100 dark:from-gray-900'
|
||||||
: selected
|
: selected
|
||||||
? 'from-gray-100 dark:from-gray-950'
|
? 'from-gray-100 dark:from-gray-950'
|
||||||
: 'invisible group-hover:visible from-gray-100 dark:from-gray-950'}
|
: 'invisible group-hover:visible from-gray-100 dark:from-gray-950'}
|
||||||
|
|||||||
Reference in New Issue
Block a user