mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
add confirmation prompt before deleting all chats
This commit is contained in:
@@ -41,14 +41,13 @@
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href={'#/'}
|
||||
class="panel-block"
|
||||
<a class="panel-block"
|
||||
class:is-disabled={!$apiKeyStorage}
|
||||
on:click={() => {
|
||||
replace('#/').then(() => {
|
||||
clearChats()
|
||||
})
|
||||
const confirmDelete = window.confirm('Are you sure you want to delete all your chats?')
|
||||
if (confirmDelete) {
|
||||
replace('#/').then(() => clearChats())
|
||||
}
|
||||
}}><span class="greyscale mr-2">🗑️</span> Clear chats</a
|
||||
>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user