diff options
| author | 2024-08-31 08:22:30 +0200 | |
|---|---|---|
| committer | 2024-08-31 08:22:30 +0200 | |
| commit | 36e98b890166d900ea630b97c520a0f189d96bc0 (patch) | |
| tree | 358be38d8a170d215d9a454da51bb96fffc6514f | |
| parent | Minor logging tweak. (diff) | |
| download | snac2-36e98b890166d900ea630b97c520a0f189d96bc0.tar.gz snac2-36e98b890166d900ea630b97c520a0f189d96bc0.tar.xz snac2-36e98b890166d900ea630b97c520a0f189d96bc0.zip | |
New 'hide_delete_post_button' server directive.
| -rw-r--r-- | doc/snac.8 | 3 | ||||
| -rw-r--r-- | html.c | 5 |
2 files changed, 7 insertions, 1 deletions
| @@ -227,6 +227,9 @@ set, it defaults to "https". If you run | |||
| 227 | as part of a hidden network like Tor or I2P that doesn't have a TLS / | 227 | as part of a hidden network like Tor or I2P that doesn't have a TLS / |
| 228 | Certificate infrastructure, you need to set it to "http". Don't change it | 228 | Certificate infrastructure, you need to set it to "http". Don't change it |
| 229 | unless you know what you are doing. | 229 | unless you know what you are doing. |
| 230 | .It Ic hide_delete_post_button | ||
| 231 | If set to true, the button to delete a post is not shown. It's not very | ||
| 232 | useful and somewhat clutters the already crowded button space. | ||
| 230 | .El | 233 | .El |
| 231 | .Pp | 234 | .Pp |
| 232 | You must restart the server to make effective these changes. | 235 | You must restart the server to make effective these changes. |
| @@ -1367,8 +1367,11 @@ xs_html *html_entry_controls(snac *snac, const char *actor, | |||
| 1367 | L("Block any activity from this user forever"))); | 1367 | L("Block any activity from this user forever"))); |
| 1368 | } | 1368 | } |
| 1369 | 1369 | ||
| 1370 | if (!xs_is_true(xs_dict_get(srv_config, "hide_delete_post_button"))) | ||
| 1371 | xs_html_add(form, | ||
| 1372 | html_button("delete", L("Delete"), L("Delete this post"))); | ||
| 1373 | |||
| 1370 | xs_html_add(form, | 1374 | xs_html_add(form, |
| 1371 | html_button("delete", L("Delete"), L("Delete this post")), | ||
| 1372 | html_button("hide", L("Hide"), L("Hide this post and its children"))); | 1375 | html_button("hide", L("Hide"), L("Hide this post and its children"))); |
| 1373 | 1376 | ||
| 1374 | const char *prev_src = xs_dict_get(msg, "sourceContent"); | 1377 | const char *prev_src = xs_dict_get(msg, "sourceContent"); |