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.
This commit is contained in:
LeoVasanko committed 2026-09-29 02:50:23 +00:00
1 parent 7935115405
commit 974365a17b
2 files changed
+14 -5

No files matched your search

+9 -2
View File
@@ -833,6 +833,10 @@ onUnmounted(() => {
@input="debounce('contact-email', () => saveSettings())"
/>
</label>
<!-- Mail server (SMTP notification backend): plumbing in place
(contactMailserver ref, settings load/save, Data field) but
the sending is not implemented yet — the field stays hidden
until then. Re-adds a fourth column to .msg-grid.
<label class="field">
<span class="field-label">mail server</span>
<input
@@ -849,6 +853,7 @@ onUnmounted(() => {
@input="debounce('contact-mailserver', () => saveSettings())"
/>
</label>
-->
</div>
</section>
@@ -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;
}
+5 -3
View File
@@ -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 })