mirror of
https://github.com/zulip/zulip.git
synced 2026-06-30 21:11:04 +08:00
message_view_header: Update tooltip when user is not logged in.
In this commit, we hide the subscriber count on the message view header tooltip for spectators, since this information is not available to such users.
This commit is contained in:
parent
af3956e1a9
commit
91cf7ca36f
@ -5,6 +5,7 @@ import render_message_view_header from "../templates/message_view_header.hbs";
|
||||
import {$t} from "./i18n";
|
||||
import * as inbox_util from "./inbox_util";
|
||||
import * as narrow_state from "./narrow_state";
|
||||
import {page_params} from "./page_params";
|
||||
import * as peer_data from "./peer_data";
|
||||
import * as recent_view_util from "./recent_view_util";
|
||||
import * as rendered_markdown from "./rendered_markdown";
|
||||
@ -31,6 +32,7 @@ function make_message_view_header(filter) {
|
||||
};
|
||||
}
|
||||
message_view_header.title = filter.get_title();
|
||||
message_view_header.is_spectator = page_params.is_spectator;
|
||||
filter.add_icon_data(message_view_header);
|
||||
if (filter.has_operator("stream") && !filter._sub) {
|
||||
message_view_header.sub_count = "0";
|
||||
|
||||
@ -5,9 +5,11 @@
|
||||
<template id="stream-details-tooltip-template">
|
||||
<div>
|
||||
<div>{{t "Go to stream settings" }}</div>
|
||||
{{#unless is_spectator}}
|
||||
<div class="tooltip-inner-content italic">
|
||||
{{t "This stream has {sub_count, plural, =0 {no subscribers} one {# subscriber} other {# subscribers}}." }}
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</template>
|
||||
<span class="narrow_description rendered_markdown">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user