mirror of
https://github.com/open-webui/open-webui
synced 2025-02-20 12:00:22 +00:00
enh: open folder on drop
This commit is contained in:
parent
d8b513023c
commit
b402061546
@ -617,8 +617,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
await initFolders();
|
|
||||||
initChatList();
|
initChatList();
|
||||||
|
await initFolders();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,6 +628,7 @@
|
|||||||
if (res) {
|
if (res) {
|
||||||
await pinnedChats.set(await getPinnedChatList(localStorage.token));
|
await pinnedChats.set(await getPinnedChatList(localStorage.token));
|
||||||
initChatList();
|
initChatList();
|
||||||
|
await initFolders();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -679,6 +680,7 @@
|
|||||||
<Folders
|
<Folders
|
||||||
{folders}
|
{folders}
|
||||||
on:update={async (e) => {
|
on:update={async (e) => {
|
||||||
|
initChatList();
|
||||||
await initFolders();
|
await initFolders();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -705,8 +707,8 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
await initFolders();
|
|
||||||
initChatList();
|
initChatList();
|
||||||
|
await initFolders();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -716,6 +718,7 @@
|
|||||||
if (res) {
|
if (res) {
|
||||||
await pinnedChats.set(await getPinnedChatList(localStorage.token));
|
await pinnedChats.set(await getPinnedChatList(localStorage.token));
|
||||||
initChatList();
|
initChatList();
|
||||||
|
await initFolders();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
import { updateChatFolderIdById } from '$lib/apis/chats';
|
import { updateChatFolderIdById } from '$lib/apis/chats';
|
||||||
import ChatItem from './ChatItem.svelte';
|
import ChatItem from './ChatItem.svelte';
|
||||||
|
|
||||||
export let open = true;
|
export let open = false;
|
||||||
|
|
||||||
export let folders;
|
export let folders;
|
||||||
export let folderId;
|
export let folderId;
|
||||||
@ -66,6 +66,7 @@
|
|||||||
const { type, id } = data;
|
const { type, id } = data;
|
||||||
|
|
||||||
if (type === 'folder') {
|
if (type === 'folder') {
|
||||||
|
open = true;
|
||||||
if (id === folderId) {
|
if (id === folderId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -81,6 +82,8 @@
|
|||||||
dispatch('update');
|
dispatch('update');
|
||||||
}
|
}
|
||||||
} else if (type === 'chat') {
|
} else if (type === 'chat') {
|
||||||
|
open = true;
|
||||||
|
|
||||||
// Move the chat
|
// Move the chat
|
||||||
const res = await updateChatFolderIdById(localStorage.token, id, folderId).catch(
|
const res = await updateChatFolderIdById(localStorage.token, id, folderId).catch(
|
||||||
(error) => {
|
(error) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user