2019-02-23 15:58:06 +01:00
<div class="message_controls {{ # status_message }} sender-status-controls {{ / status_message }} no-select">
{{ # if msg / sent_by_me }}
message_controls: Don't show pencil icon until server ack.
Previously, this was unconditional wrt local echoe which caused a bug
where by the pencil edit icon was visible first, then got hidden when
the chevron and star became visible.
This commit resolves the above bug, but this area still behaves
slightly weirdly in that, if, within a PM narrow, the user's mouse
cursor is over the spot where the message edit controls will appear
after sending, and then a message is sent by the user, only the
chevron and star appear at first. On cursor exit and reenter, all
three controls reappear ie the final state is correct.
Similar to the other "unless locally echoed" cases here, this will
probably prevent unexpected bugs caused by eg trying to enter edit
state before the message was received by the server, and then
redrawing later, etc.
2020-06-27 01:36:44 +02:00
{{ # unless msg / locally_echoed }}
<div class="edit_content"></div>
{{ / unless }}
2019-02-23 15:58:06 +01:00
{{ / if }}
{{ # unless msg / sent_by_me }}
<div class="reaction_button">
2019-07-26 00:48:17 +02:00
<i class="fa fa-smile-o" aria-label=" {{ # tr this }} Add emoji reaction {{ / tr }} (:)" role="button" aria-haspopup="true" tabindex="0"></i>
2019-02-23 15:58:06 +01:00
</div>
{{ / unless }}
{{ # unless msg / locally_echoed }}
<div class="info actions_hover">
<i class="fa fa-chevron-down" title=" {{ # tr this }} Message actions {{ / tr }} (i)" title=" {{ # tr this }} Message actions {{ / tr }} " role="button" aria-haspopup="true" tabindex="0" aria-label=" {{ # tr this }} Message actions {{ / tr }} "></i>
</div>
{{ / unless }}
<div class="message_failed {{ # unless msg .failed_request }} notvisible {{ / unless }} ">
<i class="fa fa-refresh refresh-failed-message" data-toggle="tooltip" title=" {{ t 'Retry' }} " aria-label=" {{ t 'Retry' }} " role="button" tabindex="0"></i>
<i class="fa fa-times-circle remove-failed-message" aria-hidden="true" data-toggle="tooltip" title=" {{ t 'Cancel' }} "></i>
</div>
{{ # unless msg / locally_echoed }}
<div class="star fa {{ # if msg / starred }} fa-star {{ else }} fa-star-o {{ / if }} {{ # if msg / starred }} {{ else }} empty-star {{ / if }} " title=" {{ # tr this .msg }} __starred_status__ this message {{ / tr }} (*)">
</div>
{{ / unless }}
</div>