commit 2ab9db4
default
·
2025-01-19 15:38:13 +0000 UTC
parent f3c9bd1
Added controls for the followed hashtags.
1 files changed,
+32,
-0
M
html.c
M
html.c
+32,
-0
1@@ -1355,6 +1355,38 @@ xs_html *html_top_controls(snac *snac)
2 xs_html_attr("class", "button"),
3 xs_html_attr("value", L("Update user info")))))));
4
5+ xs *followed_hashtags_action = xs_fmt("%s/admin/followed-hashtags", snac->actor);
6+ xs *followed_hashtags = xs_join(xs_dict_get_def(snac->config,
7+ "followed_hashtags", xs_stock(XSTYPE_LIST)), "\n");
8+
9+ xs_html_add(top_controls,
10+ xs_html_tag("details",
11+ xs_html_tag("summary",
12+ xs_html_text(L("Followed hashtags..."))),
13+ xs_html_tag("p",
14+ xs_html_text(L("One hashtag per line"))),
15+ xs_html_tag("div",
16+ xs_html_attr("class", "snac-followed-hashtags"),
17+ xs_html_tag("form",
18+ xs_html_attr("autocomplete", "off"),
19+ xs_html_attr("method", "post"),
20+ xs_html_attr("action", followed_hashtags_action),
21+ xs_html_attr("enctype", "multipart/form-data"),
22+
23+ xs_html_tag("textarea",
24+ xs_html_attr("name", "hashtags"),
25+ xs_html_attr("cols", "40"),
26+ xs_html_attr("rows", "4"),
27+ xs_html_attr("placeholder", "#cats\n#windowfriday\n#classicalmusic"),
28+ xs_html_text(followed_hashtags)),
29+
30+ xs_html_tag("br", NULL),
31+
32+ xs_html_sctag("input",
33+ xs_html_attr("type", "submit"),
34+ xs_html_attr("class", "button"),
35+ xs_html_attr("value", L("Update hashtags")))))));
36+
37 return top_controls;
38 }
39