mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
This commit updates the topic edit icon in the recipient row to a new "pencil" icon (added in the same commit), replacing the previous "edit" icon for consistency with the rest of the icons used in the same space.
118 lines
7.4 KiB
Handlebars
118 lines
7.4 KiB
Handlebars
{{#if is_stream}}
|
|
<div class="message_header message_header_stream right_part" data-stream-id="{{stream_id}}" {{#if topic}}data-topic-name="{{topic}}"{{/if}}>
|
|
<div class="message-header-contents" style="background: {{recipient_bar_color}};">
|
|
{{! stream link }}
|
|
<a class="message_label_clickable narrows_by_recipient stream_label tippy-narrow-tooltip"
|
|
href="{{stream_url}}"
|
|
data-tippy-content="{{t 'Go to #{display_recipient}' }}">
|
|
<span class="stream-privacy-modified-color-{{stream_id}} stream-privacy filter-icon" style="color: {{stream_privacy_icon_color}}">
|
|
{{> stream_privacy .}}
|
|
</span>
|
|
|
|
{{~! Recipient (e.g. stream/topic or topic) ~}}
|
|
<span class="message-header-stream-name">
|
|
{{~display_recipient~}}
|
|
</span>
|
|
{{#if is_archived}}
|
|
<span class="message-header-stream-archived"><i class="archived-indicator">({{t 'archived' }})</i></span>
|
|
{{/if}}
|
|
</a>
|
|
<span class="stream_topic_separator"><i class="zulip-icon zulip-icon-chevron-right"></i></span>
|
|
|
|
{{! hidden narrow icon for copy-pasting }}
|
|
<span class="copy-paste-text">></span>
|
|
|
|
{{! topic stuff }}
|
|
<span class="stream_topic">
|
|
{{! topic link }}
|
|
<a class="message_label_clickable narrows_by_topic tippy-narrow-tooltip"
|
|
href="{{topic_url}}"
|
|
data-tippy-content="{{t 'Go to #{display_recipient} > {topic_display_name}' }}">
|
|
{{#if (and use_match_properties (not is_empty_string_topic))}}
|
|
<span class="stream-topic-inner">{{{match_topic}}}</span>
|
|
{{else}}
|
|
<span class="stream-topic-inner {{#if is_empty_string_topic}}empty-topic-display{{/if}}">{{topic_display_name}}</span>
|
|
{{/if}}
|
|
</a>
|
|
</span>
|
|
<span class="recipient_bar_controls no-select">
|
|
<span class="topic_edit hidden-for-spectators"></span>
|
|
|
|
{{! exterior links (e.g. to a trac ticket) }}
|
|
{{#each topic_links}}
|
|
{{#with this}}
|
|
{{!-- TODO: Find a way to use the icon_button component with <a> tags,
|
|
instead of copying over the icon button styles via the utility classes. --}}
|
|
<a href="{{url}}" target="_blank" rel="noopener noreferrer" class="recipient-bar-control recipient-bar-control-icon no-underline icon-button icon-button-neutral" data-tippy-content="{{t 'Open {text}' }}" aria-label="{{t 'Open {text}' }}" tabindex="0">
|
|
<i class="zulip-icon zulip-icon-external-link" aria-hidden="true"></i>
|
|
</a>
|
|
{{/with}}
|
|
{{/each}}
|
|
|
|
{{! edit topic pencil icon }}
|
|
{{#if is_topic_editable}}
|
|
{{> components/icon_button icon="pencil" intent="neutral" custom_classes="on_hover_topic_edit recipient-bar-control recipient-bar-control-icon hidden-for-spectators" data-tippy-content=(t "Edit topic") aria-label=(t "Edit topic") }}
|
|
{{/if}}
|
|
|
|
{{#if (and user_can_resolve_topic (not is_empty_string_topic))}}
|
|
{{#unless topic_is_resolved}}
|
|
{{> components/icon_button icon="check" intent="neutral" custom_classes="on_hover_topic_resolve recipient-bar-control recipient-bar-control-icon hidden-for-spectators" data-tippy-content=(t "Mark as resolved") aria-label=(t "Mark as resolved") }}
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
{{! visibility policy menu }}
|
|
{{#if (and is_subscribed (not is_archived))}}
|
|
{{!-- We define the change_visibility_policy class in a wrapper span
|
|
since the icon button component already has a tippy tooltip attached
|
|
to it and Tippy does not support multiple tooltips on a single element. --}}
|
|
<span class="change_visibility_policy recipient-bar-control hidden-for-spectators" aria-haspopup="true">
|
|
{{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}
|
|
{{> components/icon_button icon="follow" intent="neutral" custom_classes="recipient-bar-control-icon" data-tippy-content=(t "You follow this topic.") aria-label=(t "You follow this topic.") }}
|
|
{{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}
|
|
{{> components/icon_button icon="unmute" intent="neutral" custom_classes="recipient-bar-control recipient-bar-control-icon" data-tippy-content=(t "You have unmuted this topic.") aria-label=(t "You have unmuted this topic.") }}
|
|
{{else if (eq visibility_policy all_visibility_policies.MUTED)}}
|
|
{{> components/icon_button icon="mute" intent="neutral" custom_classes="recipient-bar-control-icon" data-tippy-content=(t "You have muted this topic.") aria-label=(t "You have muted this topic.") }}
|
|
{{else}}
|
|
{{> components/icon_button icon="inherit" intent="neutral" custom_classes="recipient-bar-control-icon" data-tippy-content=(t "Notifications are based on your configuration for this channel.") aria-label=(t "Notifications are based on your configuration for this channel.") }}
|
|
{{/if}}
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{! Topic menu }}
|
|
{{!-- We define the recipient-row-topic-menu class in a wrapper span
|
|
since the icon button component already has a tippy tooltip attached
|
|
to it and attaching the topic actions menu popover to it causes buggy behavior. --}}
|
|
<span class="recipient-row-topic-menu recipient-bar-control" aria-haspopup="true">
|
|
{{> components/icon_button icon="more-vertical" intent="neutral" custom_classes="recipient-bar-control-icon" data-tippy-content=(t "Topic actions") aria-label=(t "Topic actions") }}
|
|
</span>
|
|
</span>
|
|
<span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="message_header message_header_private_message">
|
|
<div class="message-header-contents">
|
|
<a class="message_label_clickable narrows_by_recipient stream_label tippy-narrow-tooltip"
|
|
href="{{pm_with_url}}"
|
|
data-tippy-content="{{#if is_dm_with_self}}{{t 'Go to direct messages with yourself' }}{{else}}{{t 'Go to direct messages with {display_reply_to_for_tooltip}' }}{{/if}}">
|
|
<span class="private_message_header_icon"><i class="zulip-icon zulip-icon-user"></i></span>
|
|
<span class="private_message_header_name">
|
|
{{#if is_dm_with_self}}
|
|
{{t 'Messages with yourself' }}
|
|
{{else}}
|
|
{{~#tr}}You and <z-user-names></z-user-names>
|
|
{{#*inline "z-user-names"}}
|
|
{{#each recipient_users}}
|
|
{{~full_name}}{{#if is_bot}}<i class="zulip-icon zulip-icon-bot" aria-label="{{t 'Bot' }}"></i>{{/if~}}
|
|
{{#if should_add_guest_user_indicator}} <i>({{t 'guest'}})</i>{{/if}}{{#unless @last}}, {{/unless}}
|
|
{{/each}}
|
|
{{/inline}}
|
|
{{/tr~}}
|
|
{{/if}}
|
|
</span>
|
|
</a>
|
|
<span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|