commit bf6dd80
default
·
2024-10-28 13:41:55 +0000 UTC
parent a80ba1c
Show the collapse_threads field in the user settings.
1 files changed,
+10,
-0
M
html.c
M
html.c
+10,
-0
1@@ -1016,6 +1016,7 @@ xs_html *html_top_controls(snac *snac)
2 const xs_val *bot = xs_dict_get(snac->config, "bot");
3 const xs_val *a_private = xs_dict_get(snac->config, "private");
4 const xs_val *auto_boost = xs_dict_get(snac->config, "auto_boost");
5+ const xs_val *coll_thrds = xs_dict_get(snac->config, "collapse_threads");
6
7 xs *metadata = xs_str_new(NULL);
8 const xs_dict *md = xs_dict_get(snac->config, "metadata");
9@@ -1169,6 +1170,15 @@ xs_html *html_top_controls(snac *snac)
10 xs_html_attr("for", "private"),
11 xs_html_text(L("This account is private "
12 "(posts are not shown through the web)")))),
13+ xs_html_tag("p",
14+ xs_html_sctag("input",
15+ xs_html_attr("type", "checkbox"),
16+ xs_html_attr("name", "collapse_threads"),
17+ xs_html_attr("id", "collapse_threads"),
18+ xs_html_attr(xs_is_true(coll_thrds) ? "checked" : "", NULL)),
19+ xs_html_tag("label",
20+ xs_html_attr("for", "collapse_threads"),
21+ xs_html_text(L("Collapse top threads by default")))),
22 xs_html_tag("p",
23 xs_html_text(L("Profile metadata (key=value pairs in each line):")),
24 xs_html_sctag("br", NULL),