feat: add user color to message context and implement offset-based message pagination with extended dict

Add `color` field to message template context in ChannelMessageService. Implement `to_extended_dict` method to return full message data including user color and username. Add `offset` method for paginated message queries with descending order by creation time. Fix WebSocket event emission in app.js to use correct event name. Add `timeDescription` and `timeAgo` utility functions for client-side timestamp formatting. Enable scrollable chat messages container with overflow-y auto. Add CSS rules for message content block display and responsive image sizing. Fix scrollIntoView behavior to align to block end. Correct service worker registration path. Fix upload button to use local channelUid attribute. Strip trailing dots from link hrefs and exclude trailing dots from URL regex. Remove redundant script imports from app.html template. Uncomment message HTML template structure with proper time element. Replace chat-window element with server-rendered message list in web.html template. Refactor RPC get_messages to use new offset-based query with extended message dict.
This commit is contained in:
2025-02-09 11:35:38 +00:00
parent dd3f1deeb0
commit 0272c2ab85
12 changed files with 183 additions and 35 deletions
-5
View File
@@ -12,11 +12,6 @@
<script src="/html-frame.js"></script>
<script src="/schedule.js"></script>
<script src="/app.js"></script>
<script src="/models.js"></script>
<script src="/message-list.js"></script>
<script src="/message-list-manager.js"></script>
<script src="/chat-input.js"></script>
<script src="/chat-window.js"></script>
<link rel="stylesheet" href="/base.css">
<link rel="manifest" href="/manifest.json" />
<link rel="icon" type="image/png" href="/image/snek1.png" sizes="32x32">