mirror of https://github.com/zulip/zulip.git
topic_sidebar_actions: Implement new mute/unmute toggle UI for topics.
For topics in muted streams, replace the "Mute topic" option in the three-dot topic menu with an "Unmute topic" option, which should make the topic unmuted. For unmuted topics in muted streams, show the regular "Mute topic" option, which should specifically mark the topic as muted, as usual. Also, used new unmute icon for unmute option in three-dot menu for topics in muted stream. Fixes part of #24243
This commit is contained in:
parent
dd001e1a5f
commit
fa53026244
|
@ -139,7 +139,6 @@ export function get_topic_popover_content_context({stream_id, topic_name, url})
|
|||
topic_name,
|
||||
topic_muted,
|
||||
topic_unmuted,
|
||||
development_environment: page_params.development_environment,
|
||||
can_move_topic,
|
||||
can_rename_topic,
|
||||
is_realm_admin: page_params.is_admin,
|
||||
|
|
|
@ -8,41 +8,39 @@
|
|||
|
||||
<hr />
|
||||
|
||||
{{#if development_environment}}
|
||||
{{#if stream_muted}}
|
||||
{{#unless topic_unmuted}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-unmute-topic" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-unmute" aria-hidden="true"></i>
|
||||
{{t "Unmute topic (muted stream)"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-remove-unmute" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-unmute" aria-hidden="true"></i>
|
||||
{{t "Mute topic (muted stream)"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#unless topic_muted}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-mute-topic" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-mute" aria-hidden="true"></i>
|
||||
{{t "Mute topic"}}
|
||||
</a>
|
||||
</li>
|
||||
{{#if stream_muted}}
|
||||
{{#unless topic_unmuted}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-unmute-topic" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-unmute" aria-hidden="true"></i>
|
||||
{{t "Unmute topic"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-remove-unmute" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-unmute" aria-hidden="true"></i>
|
||||
{{t "Mute topic"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/unless}}
|
||||
{{else}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-remove-mute" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-mute" aria-hidden="true"></i>
|
||||
{{t "Unmute topic"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/unless}}
|
||||
{{#unless topic_muted}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-mute-topic" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-mute" aria-hidden="true"></i>
|
||||
{{t "Mute topic"}}
|
||||
</a>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="hidden-for-spectators">
|
||||
<a tabindex="0" class="sidebar-popover-remove-mute" data-stream-id="{{ stream_id }}" data-topic-name="{{ topic_name }}">
|
||||
<i class="zulip-icon zulip-icon-mute" aria-hidden="true"></i>
|
||||
{{t "Unmute topic"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{#if has_starred_messages}}
|
||||
<li class="hidden-for-spectators">
|
||||
|
|
Loading…
Reference in New Issue