New 'hide_delete_post_button' server directive.

This commit is contained in:
default 2024-08-31 08:22:30 +02:00
parent 5e5abd76a0
commit 36e98b8901
2 changed files with 7 additions and 1 deletions

View File

@ -227,6 +227,9 @@ set, it defaults to "https". If you run
as part of a hidden network like Tor or I2P that doesn't have a TLS / as part of a hidden network like Tor or I2P that doesn't have a TLS /
Certificate infrastructure, you need to set it to "http". Don't change it Certificate infrastructure, you need to set it to "http". Don't change it
unless you know what you are doing. unless you know what you are doing.
.It Ic hide_delete_post_button
If set to true, the button to delete a post is not shown. It's not very
useful and somewhat clutters the already crowded button space.
.El .El
.Pp .Pp
You must restart the server to make effective these changes. You must restart the server to make effective these changes.

5
html.c
View File

@ -1367,8 +1367,11 @@ xs_html *html_entry_controls(snac *snac, const char *actor,
L("Block any activity from this user forever"))); L("Block any activity from this user forever")));
} }
if (!xs_is_true(xs_dict_get(srv_config, "hide_delete_post_button")))
xs_html_add(form,
html_button("delete", L("Delete"), L("Delete this post")));
xs_html_add(form, xs_html_add(form,
html_button("delete", L("Delete"), L("Delete this post")),
html_button("hide", L("Hide"), L("Hide this post and its children"))); html_button("hide", L("Hide"), L("Hide this post and its children")));
const char *prev_src = xs_dict_get(msg, "sourceContent"); const char *prev_src = xs_dict_get(msg, "sourceContent");