Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.
Go email-relayemail-routinghttp-to-smtpmail-deliverymailchimp-alternativemailgun-alternativemailsendermailservermailtemplatemailtestpostmark-alternativesend-emailsendgrid-alternativesendmailtransactional-emailtransactional-outbox
feat(ui): add Escape key (close) support to useModalSafeClose
Jude mpoyo0d8ab5389cfd
diff --git a/web/src/composables/useModalSafeClose.ts b/web/src/composables/useModalSafeClose.tsindex 2bf218a..f65c058 100644--- a/web/src/composables/useModalSafeClose.ts+++ b/web/src/composables/useModalSafeClose.ts@@ -1,4 +1,4 @@-import { ref } from 'vue';+import { ref, onMounted, onUnmounted } from 'vue';export function useModalSafeClose(closeAction: () => void) {const isClickStartingOnOverlay = ref(false);@@ -16,6 +16,17 @@ export function useModalSafeClose(closeAction: () => void) {isClickStartingOnOverlay.value = false;};+ const handleKeyDown = (event: KeyboardEvent): void => {+ if (event.key === 'Escape') {+ closeAction();+ }+ };+ onMounted(() => {+ document.addEventListener('keydown', handleKeyDown);+ });+ onUnmounted(() => {+ document.removeEventListener('keydown', handleKeyDown);+ });return {watchClickStart,confirmClickEnd