mirror of https://github.com/zulip/zulip.git
narrow: Expand informative text in empty starred messages view.
Fixes #29378.
This commit is contained in:
parent
89a3c290db
commit
79fc430b56
|
@ -44,6 +44,23 @@ const MENTIONS_VIEW_EMPTY_BANNER = {
|
|||
),
|
||||
};
|
||||
|
||||
const STARRED_MESSAGES_VIEW_EMPTY_BANNER = {
|
||||
title: $t({defaultMessage: "You have no starred messages."}),
|
||||
html: $t_html(
|
||||
{
|
||||
defaultMessage:
|
||||
"Starring messages is a good way to keep track of important messages, such as tasks you need to go back to, or useful references. To star a message, hover over a message and click the <star-icon></star-icon>. <z-link>Learn more</z-link>",
|
||||
},
|
||||
{
|
||||
"star-icon": () => `<i class="zulip-icon zulip-icon-star" aria-hidden="true"></i>`,
|
||||
"z-link": (content_html) =>
|
||||
`<a target="_blank" rel="noopener noreferrer" href="/help/star-a-message">${content_html.join(
|
||||
"",
|
||||
)}</a>`,
|
||||
},
|
||||
),
|
||||
};
|
||||
|
||||
function retrieve_search_query_data(): SearchData {
|
||||
// when search bar contains multiple filters, only retrieve search queries
|
||||
const current_filter = narrow_state.filter();
|
||||
|
@ -208,22 +225,7 @@ function pick_empty_narrow_banner(): NarrowBannerData {
|
|||
case "is":
|
||||
switch (first_operand) {
|
||||
case "starred":
|
||||
// You currently have no starred messages.
|
||||
return {
|
||||
title: $t({defaultMessage: "You have no starred messages."}),
|
||||
html: $t_html(
|
||||
{
|
||||
defaultMessage:
|
||||
"Learn more about starring messages <z-link>here</z-link>.",
|
||||
},
|
||||
{
|
||||
"z-link": (content_html) =>
|
||||
`<a target="_blank" rel="noopener noreferrer" href="/help/star-a-message">${content_html.join(
|
||||
"",
|
||||
)}</a>`,
|
||||
},
|
||||
),
|
||||
};
|
||||
return STARRED_MESSAGES_VIEW_EMPTY_BANNER;
|
||||
case "mentioned":
|
||||
return MENTIONS_VIEW_EMPTY_BANNER;
|
||||
case "dm":
|
||||
|
|
|
@ -284,7 +284,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
|
|||
$(".empty_feed_notice_main").html(),
|
||||
empty_narrow_html(
|
||||
"translated: You have no starred messages.",
|
||||
'translated HTML: Learn more about starring messages <a target="_blank" rel="noopener noreferrer" href="/help/star-a-message">here</a>.',
|
||||
'translated HTML: Starring messages is a good way to keep track of important messages, such as tasks you need to go back to, or useful references. To star a message, hover over a message and click the <i class="zulip-icon zulip-icon-star" aria-hidden="true"></i>. <a target="_blank" rel="noopener noreferrer" href="/help/star-a-message">Learn more</a>',
|
||||
),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue