forked from retoor/devplacepy
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:
@@ -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">✉️</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">✉️</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">➖</span>Unfollow</button>
|
||||
|
||||
Reference in New Issue
Block a user