Mercurial > libervia-templates
comparison sat_templates/templates/bulma/chat/message.html @ 387:8b990c78d4b5
(bulma/chat): add menu + style for message retraction
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 30 Nov 2023 13:24:43 +0100 |
parents | e63fb06052ae |
children | 2eaea9a9c234 |
comparison
equal
deleted
inserted
replaced
386:e63fb06052ae | 387:8b990c78d4b5 |
---|---|
6 {% set own_msg = msg.from_|bare_jid==own_jid|bare_jid %} | 6 {% set own_msg = msg.from_|bare_jid==own_jid|bare_jid %} |
7 {% endif %} | 7 {% endif %} |
8 | 8 |
9 <div | 9 <div |
10 id="{{msg.id}}" | 10 id="{{msg.id}}" |
11 class="media is-chat-message msg_{{msg.type}} {{'own_msg' if own_msg}}" | 11 class="media is-chat-message msg_{{msg.type}} {{'own_msg' if own_msg}} {{ 'is-retracted' if msg.extra.retracted }}" |
12 style="padding: 0.5em;" | |
13 role="listitem" | 12 role="listitem" |
14 aria-label="Chat Message" | 13 aria-label="{{ 'Retracted Message' if msg.extra.retracted else 'Chat Message' }}" |
15 {% if msg.extra.editions %}data-editions='{{msg.extra.editions|tojson}}'{% endif %} | 14 {% if msg.extra.editions %}data-editions='{{msg.extra.editions|tojson}}'{% endif %} |
16 > | 15 > |
17 {%- if msg.type != "info" %} | 16 {%- if msg.type != "info" %} |
18 {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%} | 17 {%- set author = identities[msg.from_].nicknames[0] | default(msg.from_) -%} |
19 <figure class="media-left pt-1"> | 18 <figure class="media-left pt-1"> |
50 </div> | 49 </div> |
51 </div> | 50 </div> |
52 </div> | 51 </div> |
53 </nav> | 52 </nav> |
54 {% endif -%} | 53 {% endif -%} |
55 <p class="msg_body has-whitespace-pre-wrap {{ "has-text-info" if msg.type=="info" }}" id="msg_body_{{msg.id}}" style="margin: 0;"> | 54 <p class="msg_body has-whitespace-pre-wrap {{ "has-text-info" if msg.type=="info" or msg.extra.retracted }} m-0" id="msg_body_{{msg.id}}"> |
56 {{- msg.html or (msg.text|e|urlize|safe) -}} | 55 {%- if msg.extra.retracted %} |
56 {% trans %}This message has been retracted.{% endtrans %} | |
57 {% else %} | |
58 {{- msg.html or (msg.text|e|urlize|safe) -}} | |
59 {% endif -%} | |
57 </p> | 60 </p> |
58 | 61 |
59 <div class="url-previews is-hidden"> | 62 <div class="url-previews is-hidden"> |
60 <div class="icon-container"></div> | 63 <div class="icon-container"></div> |
61 </div> | 64 </div> |
62 | 65 |
63 <div id="actions_{{msg.id}}" class="level is-mobile actions mb-0"> | 66 <div |
67 id="actions_{{msg.id}}" | |
68 class="level is-mobile actions mb-0 {{ "is-hidden" if msg.extra.retracted }}" | |
69 > | |
64 {#{{ icon('share', cls='icon is-small action-button', id='msg_share_{{msg.id}}') }} #} | 70 {#{{ icon('share', cls='icon is-small action-button', id='msg_share_{{msg.id}}') }} #} |
65 {{ icon('smile', cls='icon is-small action-button reaction-button', id='msg_actions_{{msg.id}}') }} | 71 {{ icon('smile', cls='icon is-small action-button reaction-button', id='msg_actions_{{msg.id}}') }} |
66 {{ icon('dot-3', cls='icon is-small action-button extra-button', id='msg_actions_{{msg.id}}') }} | 72 {{ icon('dot-3', cls='icon is-small action-button extra-button', id='msg_actions_{{msg.id}}') }} |
67 </div> | 73 </div> |
68 <div id="msg_reactions_{{msg.id}}" style="margin-top: 0.5em;"> | 74 <div id="msg_reactions_{{msg.id}}" style="margin-top: 0.5em;"> |