mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-04 07:47:10 +00:00
fix(search): wire up mark as unread in the search chats modal
This commit is contained in:
parent
8dbbc206c5
commit
4c922ccdf4
1 changed files with 15 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
archiveChatById,
|
||||
updateChatById,
|
||||
updateChatFolderIdById,
|
||||
markChatUnreadById,
|
||||
getAllTags
|
||||
} from '$lib/apis/chats';
|
||||
import Spinner from '../common/Spinner.svelte';
|
||||
|
|
@ -87,6 +88,17 @@
|
|||
}
|
||||
};
|
||||
|
||||
const markUnreadHandler = async (id) => {
|
||||
const res = await markChatUnreadById(localStorage.token, id).catch((error) => {
|
||||
toast.error(`${error}`);
|
||||
return null;
|
||||
});
|
||||
|
||||
if (res) {
|
||||
await refreshSidebar();
|
||||
}
|
||||
};
|
||||
|
||||
const archiveChatHandler = async (id) => {
|
||||
try {
|
||||
await archiveChatById(localStorage.token, id);
|
||||
|
|
@ -816,6 +828,9 @@
|
|||
renameHandler={() => {
|
||||
renameHandler(chat.id);
|
||||
}}
|
||||
markUnreadHandler={() => {
|
||||
markUnreadHandler(chat.id);
|
||||
}}
|
||||
deleteHandler={() => {
|
||||
menuChatId = chat.id;
|
||||
menuChatTitle = chat.title;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue