snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit bf6dd8016f666382386f1c3291edd4f2b369746f
parent a80ba1c5386bc262aa04cb8ef9a2be7cb3812ea0
Author: default <nobody@localhost>
Date:   Mon, 28 Oct 2024 14:41:55 +0100

Show the collapse_threads field in the user settings.

Diffstat:
Mhtml.c | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git 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",