contact messages: unified overlay, corner ✉️ icon for everyone
The admin inbox leaves the short-lived /_m page and joins the visitor panel as one overlay (ContactOverlay shell over paskia's shared blur backdrop, centered dialog, full-screen on mobile): the corner ✉️ icon opens the visitor thread for visitors and the wider sidebar inbox for admins, while {contact:} trigger buttons always open the visitor side so admins can test both. The icon highlights unread state without extra connections: visitors via localStorage seen/last-admin timestamps, admins via the contact_unread count added to the /_api/settings probe, both kept live by the bundle once loaded. MessagesView owns its admin socket only while the overlay is open.
This commit is contained in:
1 parent
9a2435f03a
commit
afa6b967e6
16 files changed
+451
-427
No files matched your search
@@ -407,6 +407,47 @@ body.editing #sidebar {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* The corner ✉️ (docs/messages.md) is in the pens row for everyone, so
|
||||
needs its own positioning context for the unread markers: the same
|
||||
accent dot as the trigger buttons (visitors: a new reply) or a count
|
||||
pill (admins: unanswered threads). The marker lifts the icon out of the
|
||||
icon-btn dimming so it reads clearly. */
|
||||
.contact-icon {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.contact-icon.has-unread {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.contact-icon.has-unread::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -0.2em;
|
||||
right: -0.25em;
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
box-shadow: 0 0 0 0.12em var(--bg);
|
||||
}
|
||||
|
||||
.contact-icon .n {
|
||||
position: absolute;
|
||||
top: -0.5em;
|
||||
right: -0.7em;
|
||||
min-width: 1.3em;
|
||||
padding: 0.05em 0.3em;
|
||||
border-radius: 1em;
|
||||
background: var(--accent);
|
||||
color: var(--bg);
|
||||
font-size: 0.62em;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
grid-column: 1;
|
||||
/* Pinned to the page's start edge (not the article's) and kept in view
|
||||
|
||||
Reference in new issue
Block a user