mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Merge pull request #19 from Michael-Tanzer/delete-chats
added option to delete individual chat
This commit is contained in:
@@ -150,6 +150,13 @@
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const deleteChat = () => {
|
||||
if (confirm("Are you sure you want to delete this chat?")) {
|
||||
chatsStorage.update((chats) => chats.filter((chat) => chat.id !== chatId));
|
||||
chatId = null;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<nav class="level chat-header">
|
||||
@@ -179,6 +186,14 @@
|
||||
>
|
||||
💡
|
||||
</a>
|
||||
<a
|
||||
href={"#"}
|
||||
class="greyscale ml-2 is-hidden editbutton"
|
||||
title="Delete this chat"
|
||||
on:click|preventDefault={deleteChat}
|
||||
>
|
||||
🗑️
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user