mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
d3547f0f54
commit
1c83f48c45
1 changed files with 47 additions and 40 deletions
|
|
@ -114,6 +114,8 @@
|
||||||
} else {
|
} else {
|
||||||
// Handle the drag-and-drop data for folders or chats (same as before)
|
// Handle the drag-and-drop data for folders or chats (same as before)
|
||||||
const dataTransfer = e.dataTransfer.getData('text/plain');
|
const dataTransfer = e.dataTransfer.getData('text/plain');
|
||||||
|
|
||||||
|
try {
|
||||||
const data = JSON.parse(dataTransfer);
|
const data = JSON.parse(dataTransfer);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
|
|
@ -157,17 +159,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move the chat
|
// Move the chat
|
||||||
const res = await updateChatFolderIdById(localStorage.token, chat.id, folderId).catch(
|
const res = await updateChatFolderIdById(
|
||||||
(error) => {
|
localStorage.token,
|
||||||
|
chat.id,
|
||||||
|
folderId
|
||||||
|
).catch((error) => {
|
||||||
toast.error(`${error}`);
|
toast.error(`${error}`);
|
||||||
return null;
|
return null;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
dispatch('update');
|
dispatch('update');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log('Error parsing dataTransfer:', error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue