# HG changeset patch # User Goffi # Date 1746484661 -7200 # Node ID 66f98ee041d89c55d81703f514d0f84f4db49f9d # Parent 65c53ec5e7776c7c86e93b8556bd3a5defd5326a chat: add UI for replies/threads: rel 457 diff -r 65c53ec5e777 -r 66f98ee041d8 sat_templates/templates/bulma/chat/chat.html --- a/sat_templates/templates/bulma/chat/chat.html Fri Apr 11 21:32:05 2025 +0200 +++ b/sat_templates/templates/bulma/chat/chat.html Tue May 06 00:37:41 2025 +0200 @@ -6,7 +6,7 @@ {% block title %}{{ target_jid }} - {{ super() }}{% endblock %} {% block body %} {{ icon_defs( - "share-nodes", "ellipsis","regular face-smile", "quote-left", "paperclip", "pencil", "regular trash-can" + "comment-dots", "ellipsis", "paperclip", "pencil", "quote-left", "reply", "regular face-smile", "regular trash-can", "share-nodes" ) }} @@ -96,40 +96,15 @@ {% endfor %} - -
- {% for file in attachments %} - {% include 'chat/attachment_preview.html' %} - {% endfor %} -
-
-
-
- - -
-
- -
-
- -
-
+
+ {% include 'chat/message_input.html' %}
+
diff -r 65c53ec5e777 -r 66f98ee041d8 sat_templates/templates/bulma/chat/message.html --- a/sat_templates/templates/bulma/chat/message.html Fri Apr 11 21:32:05 2025 +0200 +++ b/sat_templates/templates/bulma/chat/message.html Tue May 06 00:37:41 2025 +0200 @@ -9,9 +9,10 @@
{%- if msg.type != "info" %} {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%} @@ -27,6 +28,9 @@ {{author}} {{(msg.extra.updated or msg.timestamp)|date_fmt('short', tz_name=tz_name)}} + {% if msg.reply_to or msg.extra.thread %} + {{ icon('comment-dots', cls='icon is-small message-thread') }} + {% endif %} {% if msg.extra.editions %} {{ icon('pencil', cls='icon is-small message-editions') }} {% endif %} @@ -65,8 +69,9 @@
{# {{ icon('share-nodes', cls='icon is-small action-button', id='msg_share_' + msg.id) }} #} - {{ icon('regular face-smile', cls='icon is-small action-button reaction-button', id='msg_actions_' + msg.id) }} - {{ icon('ellipsis', cls='icon is-small action-button extra-button', id='msg_actions_' + msg.id) }} + {{ icon('reply', cls='icon is-small action-button reply-button')}} + {{ icon('regular face-smile', cls='icon is-small action-button reaction-button') }} + {{ icon('ellipsis', cls='icon is-small action-button extra-button') }}
diff -r 65c53ec5e777 -r 66f98ee041d8 sat_templates/templates/bulma/chat/message_input.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sat_templates/templates/bulma/chat/message_input.html Tue May 06 00:37:41 2025 +0200 @@ -0,0 +1,46 @@ + +
+ +
+ {% for file in attachments %} + {% include 'chat/attachment_preview.html' %} + {% endfor %} +
+ +
+ + + + + +
+
+ + +
+
+ +
+
+ +
+
+
+
diff -r 65c53ec5e777 -r 66f98ee041d8 sat_templates/templates/bulma/chat/thread_panel.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sat_templates/templates/bulma/chat/thread_panel.html Tue May 06 00:37:41 2025 +0200 @@ -0,0 +1,7 @@ + diff -r 65c53ec5e777 -r 66f98ee041d8 sat_templates/templates/bulma/static/chat.css --- a/sat_templates/templates/bulma/static/chat.css Fri Apr 11 21:32:05 2025 +0200 +++ b/sat_templates/templates/bulma/static/chat.css Tue May 06 00:37:41 2025 +0200 @@ -251,3 +251,13 @@ width: 9rem; height: 6rem; } + + +/* Reply to indicator */ +#reply-to { + background-color: var(--message-background); + border-left: 4px solid #3273dc; + padding: 0.5rem; + margin-bottom: 1rem; + border-radius: 0.25rem; +} diff -r 65c53ec5e777 -r 66f98ee041d8 sat_templates/templates/bulma/static/styles.css --- a/sat_templates/templates/bulma/static/styles.css Fri Apr 11 21:32:05 2025 +0200 +++ b/sat_templates/templates/bulma/static/styles.css Tue May 06 00:37:41 2025 +0200 @@ -23,6 +23,10 @@ height: 100%; } +.is-full-width { + width: 100%; +} + .navbar-item { gap: 0; }