message_view_header: Allow showing HTML as navbar title.

This will be used show channel icon in title in the text
"All topics in # channel".
This commit is contained in:
Aman Agrawal 2025-04-23 11:40:30 +05:30 committed by Tim Abbott
parent 001c16ef86
commit 92bcfe9f42
3 changed files with 11 additions and 3 deletions

View File

@ -23,7 +23,8 @@ import * as user_topics from "./user_topics.ts";
import * as util from "./util.ts";
type IconData = {
title: string;
title?: string | undefined;
html_title?: string | undefined;
is_spectator: boolean;
} & (
| {
@ -1317,7 +1318,8 @@ export class Filter {
}
add_icon_data(context: {
title: string;
title?: string;
html_title?: string;
description?: string | undefined;
link?: string | undefined;
is_spectator: boolean;

View File

@ -18,7 +18,8 @@ import * as stream_data from "./stream_data.ts";
import type {StreamSubscription} from "./sub_store.ts";
type MessageViewHeaderContext = {
title: string;
title?: string | undefined;
html_title?: string | undefined;
description?: string;
link?: string;
is_spectator?: boolean;

View File

@ -3,7 +3,12 @@
{{else if icon}}
<i class="navbar-icon fa fa-{{icon}}" aria-hidden="true"></i>
{{/if}}
{{#if title}}
<span class="message-header-navbar-title">{{title}}</span>
{{/if}}
{{#if html_title}}
<span class="message-header-navbar-title">{{{html_title}}}</span>
{{/if}}
{{#if stream}}
{{#if stream.is_archived}}
<span class="message-header-archived">