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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 111 additions and 123 deletions

View file

@ -19,7 +19,7 @@
}>();
</script>
<FullScreenModal on:clickOutside={() => dispatch('close')}>
<FullScreenModal onClose={() => dispatch('close')}>
<div class="flex h-full w-full place-content-center place-items-center overflow-hidden p-2 md:p-0">
<div
class="w-[550px] rounded-3xl border bg-immich-bg shadow-sm dark:border-immich-dark-gray dark:bg-immich-dark-gray dark:text-immich-dark-fg"

View file

@ -129,8 +129,8 @@
title="Leave Album?"
prompt="Are you sure you want to leave {album.albumName}?"
confirmText="Leave"
on:confirm={handleRemoveUser}
on:cancel={() => (selectedRemoveUser = null)}
onConfirm={handleRemoveUser}
onClose={() => (selectedRemoveUser = null)}
/>
{/if}
@ -139,7 +139,7 @@
title="Remove User?"
prompt="Are you sure you want to remove {selectedRemoveUser.name}"
confirmText="Remove"
on:confirm={handleRemoveUser}
on:cancel={() => (selectedRemoveUser = null)}
onConfirm={handleRemoveUser}
onClose={() => (selectedRemoveUser = null)}
/>
{/if}