Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

info_overlay: Migrate status message example to Handlebars.

Anders Kaseorg6427dcd9a830
diff --git a/web/src/info_overlay.ts b/web/src/info_overlay.ts
index 9efaf8a44b5..87cd175497e 100644
--- a/web/src/info_overlay.ts
+++ b/web/src/info_overlay.ts
@@ -3,6 +3,7 @@ import $ from "jquery";
import render_keyboard_shortcut from "../templates/keyboard_shortcuts.hbs";
import render_markdown_help from "../templates/markdown_help.hbs";
import render_search_operator from "../templates/search_operators.hbs";
+import render_status_message_example from "../templates/status_message_example.hbs";
import * as browser_history from "./browser_history.ts";
import * as common from "./common.ts";
@@ -155,7 +156,7 @@ def f():
{
markdown: `/me ${$t({defaultMessage: "is busy working"})}`,
// output_html required since /me rendering is not done in Markdown processor.
- output_html: `<p><span class="sender_name">Iago</span> <span class="status-message">${$t({defaultMessage: "is busy working"})}</span></p>`,
+ output_html: render_status_message_example(),
},
{
markdown: "<time:2023-05-28T13:30:00+05:30>",
diff --git a/web/templates/status_message_example.hbs b/web/templates/status_message_example.hbs
new file mode 100644
index 00000000000..05973ec06cd
--- /dev/null
+++ b/web/templates/status_message_example.hbs
@@ -0,0 +1 @@
+<p><span class="sender_name">Iago</span> <span class="status-message">{{t "is busy working"}}</span></p>