Files
devplacepy/devplacepy/templates/notifications.html
T
blindxfishandClaude Opus 5.5 17da9cb30c 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>
2026-11-07 13:21:29 +01:00

49 lines
2.5 KiB
HTML

{% extends "base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ static_url('/static/css/notifications.css') }}">
{% endblock %}
{% block content %}
<div class="notifications-page">
<div class="notifications-header">
<h2>Notifications</h2>
<div class="notifications-actions">
<button type="button" class="btn btn-ghost btn-sm" data-push-enable hidden><span class="icon">🔔</span>Enable push</button>
<form method="POST" action="/notifications/mark-all-read">
<button type="submit" class="btn btn-ghost btn-sm"><span class="icon">✅</span>Clear</button>
</form>
</div>
</div>
<div class="notifications-list" role="list" aria-label="Notifications">
{% for group in notification_groups %}
<div class="notification-group">
<div class="notification-group-label">{{ group.label }}</div>
{% for item in group.entries %}
<div class="notification-card card-link-host {% if not item.notification['read'] %}unread{% endif %}" role="listitem">
{% if not item.notification['read'] %}<span class="sr-only">Unread notification. </span>{% endif %}
{% set actor_username = item.actor['username'] if item.actor else '#' %}
{% set _href = "/notifications/open/" ~ item.notification['uid'] %}
{% set _label = item.notification['message'] %}
{% with _chat_user = item.actor if item.notification['type'] == 'message' else none %}{% include "_card_link.html" %}{% endwith %}
<span class="notif-icon-fixed">
{% set _user = item.actor %}{% set _size = 32 %}{% set _size_class = "sm" %}{% include "_avatar_link.html" %}
</span>
<div class="notification-body">
<div class="notification-text rendered-title">{{ render_title(item.notification['message']) }}</div>
<div class="notification-time">{{ dt_ago(item.created_at) if item.created_at else item.time_ago }}</div>
</div>
<form method="POST" action="/notifications/mark-read/{{ item.notification['uid'] }}" class="inline-form">
<button type="submit" class="notification-dismiss" aria-label="Mark as read">&times;</button>
</form>
</div>
{% endfor %}
</div>
{% else %}
<div class="empty-state">No notifications yet</div>
{% endfor %}
</div>
{% include "_load_more.html" %}
</div>
{% endblock %}