fix(web): consistent modal escape behavior (#7677)

* fix(web): consistent modal escape behavior

* make onClose optional
This commit is contained in:
Michel Heusschen
2024-03-07 04:18:53 +01:00
committed by GitHub
parent 3da2b05428
commit 5dd11ca17a
39 changed files with 111 additions and 123 deletions

View File

@@ -59,8 +59,8 @@
<ConfirmDialogue
title="Remove from {album.albumName}"
confirmText="Remove"
on:confirm={removeFromAlbum}
on:cancel={() => (isShowConfirmation = false)}
onConfirm={removeFromAlbum}
onClose={() => (isShowConfirmation = false)}
>
<svelte:fragment slot="prompt">
<p>

View File

@@ -53,7 +53,7 @@
title="Remove Assets?"
prompt="Are you sure you want to remove {getAssets().size} asset(s) from this shared link?"
confirmText="Remove"
on:confirm={() => handleRemove()}
on:cancel={() => (removing = false)}
onConfirm={() => handleRemove()}
onClose={() => (removing = false)}
/>
{/if}

View File

@@ -27,9 +27,8 @@
<ConfirmDialogue
title="Permanently Delete Asset{size > 1 ? 's' : ''}"
confirmText="Delete"
on:confirm={handleConfirm}
on:cancel={() => dispatch('cancel')}
on:escape={() => dispatch('cancel')}
onConfirm={handleConfirm}
onClose={() => dispatch('cancel')}
>
<svelte:fragment slot="prompt">
<p>