message_controls: Hide irrelevant icons for spectators.

This commit is contained in:
Aman Agrawal 2021-06-15 19:59:19 +00:00 committed by Tim Abbott
parent 0a84123f0b
commit f26a76a9d8
2 changed files with 4 additions and 4 deletions

View File

@ -1,10 +1,10 @@
<div class="message_controls{{#status_message}} sender-status-controls{{/status_message}} no-select">
{{#if msg/sent_by_me}}
<div class="edit_content message_control_button"></div>
<div class="edit_content message_control_button hidden-for-spectators"></div>
{{/if}}
{{#unless msg/sent_by_me}}
<div class="reaction_button message_control_button" data-tippy-content="{{t 'Add emoji reaction' }} (:)">
<div class="reaction_button message_control_button hidden-for-spectators" data-tippy-content="{{t 'Add emoji reaction' }} (:)">
<i class="fa fa-smile-o" aria-label="{{#tr}}Add emoji reaction{{/tr}} (:)" role="button" aria-haspopup="true" tabindex="0"></i>
</div>
{{/unless}}
@ -21,7 +21,7 @@
</div>
{{#unless msg/locally_echoed}}
<div class="star_container message_control_button {{#if msg/starred}}{{else}}empty-star{{/if}}" data-tippy-content="{{#with msg}}{{#tr}}{starred_status} this message{{/tr}}{{/with}} (Ctrl + s)">
<div class="star_container message_control_button {{#if msg/starred}}{{else}}empty-star{{/if}} hidden-for-spectators" data-tippy-content="{{#with msg}}{{#tr}}{starred_status} this message{{/tr}}{{/with}} (Ctrl + s)">
<i role="button" tabindex="0" class="star fa {{#if msg/starred}}fa-star{{else}}fa-star-o{{/if}}"></i>
</div>
{{/unless}}

View File

@ -1,7 +1,7 @@
{{#each this/msg/message_reactions}}
{{> message_reaction}}
{{/each}}
<div class="reaction_button" data-tippy-content="{{t 'Add emoji reaction' }}" aria-label="{{t 'Add emoji reaction' }} (:)">
<div class="reaction_button hidden-for-spectators" data-tippy-content="{{t 'Add emoji reaction' }}" aria-label="{{t 'Add emoji reaction' }} (:)">
<i class="fa fa-smile-o" role="button" aria-haspopup="true" tabindex="0" aria-label="{{t 'Add emoji reaction' }} (:)"></i>
<div class="message_reaction_count">+</div>
</div>