diff options
| author | grunfink <grunfink@comam.es> | 2026-06-02 09:38:09 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-06-02 09:38:09 +0200 |
| commit | e5696072023056552a997a499a3a8399b20ed431 (patch) | |
| tree | 5d18dde81a0dfd1e2627e12a89063dc96e62e498 /html.c | |
| parent | 41fea226322ca945ffec574a2f69d0b6adb63ff2 (diff) | |
Added web UI to set the 'excluded_langs'.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1613,6 +1613,7 @@ xs_html *html_top_controls(snac *user) 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", ""); + const char *excluded_langs = xs_dict_get_def(user->config, "excluded_langs", ""); xs *metadata = NULL; const xs_dict *md = xs_dict_get(user->config, "metadata"); @@ -1851,6 +1852,15 @@ xs_html *html_top_controls(snac *user) xs_html_attr("placeholder", L("en fr es de_AT")))), xs_html_tag("p", + xs_html_text(L("Exclude posts written in these languages:")), + xs_html_sctag("br", NULL), + xs_html_sctag("input", + xs_html_attr("type", "text"), + xs_html_attr("name", "excluded_langs"), + xs_html_attr("value", excluded_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", @@ -5991,6 +6001,10 @@ int html_post_handler(const xs_dict *req, const char *q_path, 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); + if ((v = xs_dict_get(p_vars, "excluded_langs")) != NULL) + snac.config = xs_dict_set(snac.config, "excluded_langs", v); + else + snac.config = xs_dict_del(snac.config, "excluded_langs"); 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", "")); |