add confirmation prompt before deleting all chats
This commit is contained in:
parent
265f361876
commit
f6f17bfd0d
|
@ -41,14 +41,13 @@
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a class="panel-block"
|
||||||
href={'#/'}
|
|
||||||
class="panel-block"
|
|
||||||
class:is-disabled={!$apiKeyStorage}
|
class:is-disabled={!$apiKeyStorage}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
replace('#/').then(() => {
|
const confirmDelete = window.confirm('Are you sure you want to delete all your chats?')
|
||||||
clearChats()
|
if (confirmDelete) {
|
||||||
})
|
replace('#/').then(() => clearChats())
|
||||||
|
}
|
||||||
}}><span class="greyscale mr-2">🗑️</span> Clear chats</a
|
}}><span class="greyscale mr-2">🗑️</span> Clear chats</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue