aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-10-28 14:41:55 +0100
committerdefault <nobody@localhost>2024-10-28 14:41:55 +0100
commitbf6dd8016f666382386f1c3291edd4f2b369746f (patch)
tree4fd902416b25da3d25e4321ff4f54ad0da06ea1a /html.c
parenta80ba1c5386bc262aa04cb8ef9a2be7cb3812ea0 (diff)
Show the collapse_threads field in the user settings.
Diffstat (limited to 'html.c')
-rw-r--r--html.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/html.c b/html.c
index 08f2ef1..ef24690 100644
--- a/html.c
+++ b/html.c
@@ -1016,6 +1016,7 @@ xs_html *html_top_controls(snac *snac)
const xs_val *bot = xs_dict_get(snac->config, "bot");
const xs_val *a_private = xs_dict_get(snac->config, "private");
const xs_val *auto_boost = xs_dict_get(snac->config, "auto_boost");
+ const xs_val *coll_thrds = xs_dict_get(snac->config, "collapse_threads");
xs *metadata = xs_str_new(NULL);
const xs_dict *md = xs_dict_get(snac->config, "metadata");
@@ -1170,6 +1171,15 @@ xs_html *html_top_controls(snac *snac)
xs_html_text(L("This account is private "
"(posts are not shown through the web)")))),
xs_html_tag("p",
+ xs_html_sctag("input",
+ xs_html_attr("type", "checkbox"),
+ xs_html_attr("name", "collapse_threads"),
+ xs_html_attr("id", "collapse_threads"),
+ xs_html_attr(xs_is_true(coll_thrds) ? "checked" : "", NULL)),
+ xs_html_tag("label",
+ xs_html_attr("for", "collapse_threads"),
+ xs_html_text(L("Collapse top threads by default")))),
+ xs_html_tag("p",
xs_html_text(L("Profile metadata (key=value pairs in each line):")),
xs_html_sctag("br", NULL),
xs_html_tag("textarea",