summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2024-10-28 14:41:55 +0100
committerGravatar default2024-10-28 14:41:55 +0100
commitbf6dd8016f666382386f1c3291edd4f2b369746f (patch)
tree4fd902416b25da3d25e4321ff4f54ad0da06ea1a /html.c
parentUse the 'collapse_threads' field from user.json. (diff)
downloadsnac2-bf6dd8016f666382386f1c3291edd4f2b369746f.tar.gz
snac2-bf6dd8016f666382386f1c3291edd4f2b369746f.tar.xz
snac2-bf6dd8016f666382386f1c3291edd4f2b369746f.zip
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)
1016 const xs_val *bot = xs_dict_get(snac->config, "bot"); 1016 const xs_val *bot = xs_dict_get(snac->config, "bot");
1017 const xs_val *a_private = xs_dict_get(snac->config, "private"); 1017 const xs_val *a_private = xs_dict_get(snac->config, "private");
1018 const xs_val *auto_boost = xs_dict_get(snac->config, "auto_boost"); 1018 const xs_val *auto_boost = xs_dict_get(snac->config, "auto_boost");
1019 const xs_val *coll_thrds = xs_dict_get(snac->config, "collapse_threads");
1019 1020
1020 xs *metadata = xs_str_new(NULL); 1021 xs *metadata = xs_str_new(NULL);
1021 const xs_dict *md = xs_dict_get(snac->config, "metadata"); 1022 const xs_dict *md = xs_dict_get(snac->config, "metadata");
@@ -1170,6 +1171,15 @@ xs_html *html_top_controls(snac *snac)
1170 xs_html_text(L("This account is private " 1171 xs_html_text(L("This account is private "
1171 "(posts are not shown through the web)")))), 1172 "(posts are not shown through the web)")))),
1172 xs_html_tag("p", 1173 xs_html_tag("p",
1174 xs_html_sctag("input",
1175 xs_html_attr("type", "checkbox"),
1176 xs_html_attr("name", "collapse_threads"),
1177 xs_html_attr("id", "collapse_threads"),
1178 xs_html_attr(xs_is_true(coll_thrds) ? "checked" : "", NULL)),
1179 xs_html_tag("label",
1180 xs_html_attr("for", "collapse_threads"),
1181 xs_html_text(L("Collapse top threads by default")))),
1182 xs_html_tag("p",
1173 xs_html_text(L("Profile metadata (key=value pairs in each line):")), 1183 xs_html_text(L("Profile metadata (key=value pairs in each line):")),
1174 xs_html_sctag("br", NULL), 1184 xs_html_sctag("br", NULL),
1175 xs_html_tag("textarea", 1185 xs_html_tag("textarea",