mirror of
https://github.com/immich-app/immich.git
synced 2025-11-27 13:19:56 +09:00
fix(web): escape shortcut (#3753)
* fix: escape shortcut * feat: more escape scenarios * feat: more escape shortcuts --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
let isConfirmButtonDisabled = false;
|
||||
|
||||
const handleCancel = () => dispatch('cancel');
|
||||
const handleEscape = () => {
|
||||
if (!isConfirmButtonDisabled) {
|
||||
dispatch('cancel');
|
||||
}
|
||||
};
|
||||
|
||||
const handleConfirm = () => {
|
||||
isConfirmButtonDisabled = true;
|
||||
@@ -24,7 +29,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<FullScreenModal on:clickOutside={handleCancel}>
|
||||
<FullScreenModal on:clickOutside={handleCancel} on:escape={() => handleEscape()}>
|
||||
<div
|
||||
class="w-[500px] max-w-[95vw] rounded-3xl border bg-immich-bg p-4 py-8 shadow-sm dark:border-immich-dark-gray dark:bg-immich-dark-gray dark:text-immich-dark-fg"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user