Messages: Facebook-style Chats panel and docked chat windows

The topnav Messages icon opens a Chats panel (people search, recent
conversations, New message, link to the full page). Picking a person
opens a small chat window docked bottom-right; windows minimize to
avatar heads with unread counts and survive navigation within the tab.
Profile Send Message, the live message toast and message notifications
on /notifications open the same window. Phones and /messages keep the
full page.

Each window is dp-chat in mode="window", sharing one WebSocket through
chat/ChatSocketHub.js; chat/ConversationItem.js is the shared row
builder. No server changes.

The message input becomes [+] [text + emoji] [send] everywhere: + reveals
the attach and GIF buttons, which tuck away while typing.

Also fixes linked toasts never receiving clicks (pointer-events).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 13:21:29 +01:00
co-authored by Claude Opus 5.5
parent 920a679dcf
commit 17da9cb30c
28 changed files with 1527 additions and 202 deletions
+1 -1
View File
@@ -64,7 +64,7 @@
{% if not is_self(user, profile_user['uid']) %}
<div class="profile-actions">
<a href="{% if user %}/messages?with_uid={{ profile_user['uid'] }}{% else %}/auth/login{% endif %}" class="btn btn-secondary btn-sm full-width justify-center{% if not user %} login-required{% endif %}"><span class="icon">&#x2709;&#xFE0F;</span>Send Message</a>
<a href="{% if user %}/messages?with_uid={{ profile_user['uid'] }}{% else %}/auth/login{% endif %}" class="btn btn-secondary btn-sm full-width justify-center{% if not user %} login-required{% endif %}"{% if user %}{% with _chat_user = profile_user %}{% include "_chat_open_attrs.html" %}{% endwith %}{% endif %}><span class="icon">&#x2709;&#xFE0F;</span>Send Message</a>
{% if is_following %}
<form method="POST" action="/follow/unfollow/{{ profile_user['username'] }}">
<button type="submit" class="btn btn-secondary btn-sm full-width"{{ guest_disabled(user) }}><span class="icon">&#x2796;</span>Unfollow</button>