Merge pull request #73 from shivan2418/add_confirmation_before_deleting_all_chats
add confirmation prompt before deleting all chats
This commit is contained in:
commit
71179d699e
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue