From 974365a17bdbf6505404c27b6a427b667a9a54c7 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 29 Sep 2026 02:50:23 +0000 Subject: [PATCH] contact messages: hide the mail server field until the backend lands The setting plumbing (Data field, /_api/settings, editor refs) stays; the input is commented out of the messaging grid, which goes back to three columns. Also: the admin watch skips unread:false thread pushes, so a read-marking echo for a thread beyond the watch's baseline cap can no longer fire a spurious new-message notification. --- frontend/src/SiteEditor.vue | 11 +++++++++-- frontend/src/contact-main.js | 8 +++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/src/SiteEditor.vue b/frontend/src/SiteEditor.vue index bf5e2e3..221aa60 100644 --- a/frontend/src/SiteEditor.vue +++ b/frontend/src/SiteEditor.vue @@ -833,6 +833,10 @@ onUnmounted(() => { @input="debounce('contact-email', () => saveSettings())" /> + @@ -986,7 +991,8 @@ onUnmounted(() => { article editor's flag selector and the boxes on the second, so the flag centers with the boxes and every label sits directly above its own field (contact button label = the enable switch, email subject, - then the email group: our email + mail server). The flag column sizes + our email; the hidden mail-server field joins the email group once the + backend lands). The flag column sizes to the flag; when only one language is configured the selector renders nothing and the column collapses. The boxes are readonly until first interaction (+ vendor ignore @@ -994,7 +1000,8 @@ onUnmounted(() => { matter the autocomplete setting. */ .msg-grid { display: grid; - grid-template-columns: auto repeat(4, minmax(0, 1fr)); + /* The hidden mail-server field (template comment) re-adds a column. */ + grid-template-columns: auto repeat(3, minmax(0, 1fr)); align-items: center; gap: 0.15rem 0.6rem; } diff --git a/frontend/src/contact-main.js b/frontend/src/contact-main.js index 7b3100a..508eb86 100644 --- a/frontend/src/contact-main.js +++ b/frontend/src/contact-main.js @@ -315,9 +315,11 @@ function watchThread(t) { watchThreads.set(t.id, t) watchBadge() // No notification for history (the first 'threads' push baselines), the - // admin's own replies, non-message updates (prev === last.id), closed - // threads — or while the inbox is open (MessagesView notifies then). - if (!last || last.admin || prev === last.id || t.closed) return + // admin's own replies, non-message updates (prev === last.id — or an + // unread:false push, e.g. a read marking for a thread beyond the + // baseline cap), closed threads — or while the inbox is open + // (MessagesView notifies then). + if (!last || last.admin || !t.unread || prev === last.id || t.closed) return if (state.open && state.mode === 'admin') return notifyMessage(`New message from ${t.name || 'a visitor'}`, messageText(last.html), () => open(bridge, { admin: true })