Merge pull request #73 from shivan2418/add_confirmation_before_deleting_all_chats

add confirmation prompt before deleting all chats
This commit is contained in:
Niek van der Maas 2023-03-24 15:14:56 +01:00 committed by GitHub
commit 71179d699e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -41,14 +41,14 @@
>
</li>
<li>
<a
href={'#/'}
class="panel-block"
<a class="panel-block"
href="{'#/'}"
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>