diff options
| author | grunfink <grunfink@comam.es> | 2025-08-12 11:00:19 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2025-08-12 11:00:19 +0200 |
| commit | 40592fb3d4b6519f611a25048481c19ce92b1cbe (patch) | |
| tree | 5abb3163d6281c071964198e0f09ad836bb3e36d /html.c | |
| parent | 944394e583fea7b8f158e5605ce4fdb9f210c5c3 (diff) | |
post_langs can now be set from the user settings.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1346,6 +1346,7 @@ xs_html *html_top_controls(snac *user) const char *latitude = xs_dict_get_def(user->config, "latitude", ""); const char *longitude = xs_dict_get_def(user->config, "longitude", ""); const char *webhook = xs_dict_get_def(user->config, "notify_webhook", ""); + const char *post_langs = xs_dict_get_def(user->config, "post_langs", ""); xs *metadata = NULL; const xs_dict *md = xs_dict_get(user->config, "metadata"); @@ -1622,6 +1623,15 @@ xs_html *html_top_controls(snac *user) tz_select), xs_html_tag("p", + xs_html_text(L("Languages you usually post in:")), + xs_html_sctag("br", NULL), + xs_html_sctag("input", + xs_html_attr("type", "next"), + xs_html_attr("name", "post_langs"), + xs_html_attr("value", post_langs), + xs_html_attr("placeholder", L("en fr es de_AT")))), + + xs_html_tag("p", xs_html_text(L("New password:")), xs_html_sctag("br", NULL), xs_html_sctag("input", @@ -4924,6 +4934,8 @@ int html_post_handler(const xs_dict *req, const char *q_path, snac.config = xs_dict_set(snac.config, "lang", v); if ((v = xs_dict_get(p_vars, "tz")) != NULL) snac.config = xs_dict_set(snac.config, "tz", v); + if ((v = xs_dict_get(p_vars, "post_langs")) != NULL) + snac.config = xs_dict_set(snac.config, "post_langs", v); snac.config = xs_dict_set(snac.config, "latitude", xs_dict_get_def(p_vars, "latitude", "")); snac.config = xs_dict_set(snac.config, "longitude", xs_dict_get_def(p_vars, "longitude", "")); |