From 9a2435f03a17f562289a820e2c5ece3a5ef830f9 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 28 Sep 2026 01:04:33 +0000 Subject: [PATCH] contact messages: centered panel on paskia's shared blur backdrop The panel was a right-docked sidebar with its own translucent backdrop. It is main content: now centered at the paskia dialog's dimensions (min(36rem,100%) x min(42rem,92vh)), full-screen below 36rem, holding the refcounted global blur backdrop (z 1099) while open with the panel's click-catch overlay at 1100 (below the auth iframe at 9999). Escape closes too. --- frontend/src/ContactPanel.vue | 47 ++++++++++++++++++++++++++--------- frontend/src/contact-main.js | 11 +++++++- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/frontend/src/ContactPanel.vue b/frontend/src/ContactPanel.vue index 7bcb020..927eca3 100644 --- a/frontend/src/ContactPanel.vue +++ b/frontend/src/ContactPanel.vue @@ -3,7 +3,7 @@ // socket (via the bridge pagerite.js hands to contact-main), with the // composer shared with the admin inbox. state is contact-main's reactive // store ({open, thread, unread}). -import { computed, nextTick, reactive, ref, watch } from 'vue' +import { computed, nextTick, onMounted, onUnmounted, reactive, ref, watch } from 'vue' import { formatWhen } from './analytics/format.js' import Composer from './Composer.vue' @@ -26,6 +26,13 @@ watch(() => props.state.open, (open) => { if (open) scrollDown() }) // Relative timestamps like in analytics. const fmtTime = (t) => formatWhen(t) +// Escape closes, like the paskia dialogs whose backdrop we share. +function onKey(ev) { + if (ev.key === 'Escape' && props.state.open) emit('close') +} +onMounted(() => addEventListener('keydown', onKey)) +onUnmounted(() => removeEventListener('keydown', onKey)) + const NAME_KEY = 'pagerite-contact-name' const EMAIL_KEY = 'pagerite-contact-email' @@ -53,7 +60,7 @@ function onSend(md) {