diff options
| author | 2025-01-19 16:38:13 +0100 | |
|---|---|---|
| committer | 2025-01-19 16:38:13 +0100 | |
| commit | 2ab9db4175cde75889bb43d0805d96759d6215bc (patch) | |
| tree | 575a37a2bcd8ad024aeaed666f96190fe8bf1a20 | |
| parent | Fixed the greeting.html template to have a closing head tag. (diff) | |
| download | penes-snac2-2ab9db4175cde75889bb43d0805d96759d6215bc.tar.gz penes-snac2-2ab9db4175cde75889bb43d0805d96759d6215bc.tar.xz penes-snac2-2ab9db4175cde75889bb43d0805d96759d6215bc.zip | |
Added controls for the followed hashtags.
| -rw-r--r-- | html.c | 32 |
1 files changed, 32 insertions, 0 deletions
| @@ -1355,6 +1355,38 @@ xs_html *html_top_controls(snac *snac) | |||
| 1355 | xs_html_attr("class", "button"), | 1355 | xs_html_attr("class", "button"), |
| 1356 | xs_html_attr("value", L("Update user info"))))))); | 1356 | xs_html_attr("value", L("Update user info"))))))); |
| 1357 | 1357 | ||
| 1358 | xs *followed_hashtags_action = xs_fmt("%s/admin/followed-hashtags", snac->actor); | ||
| 1359 | xs *followed_hashtags = xs_join(xs_dict_get_def(snac->config, | ||
| 1360 | "followed_hashtags", xs_stock(XSTYPE_LIST)), "\n"); | ||
| 1361 | |||
| 1362 | xs_html_add(top_controls, | ||
| 1363 | xs_html_tag("details", | ||
| 1364 | xs_html_tag("summary", | ||
| 1365 | xs_html_text(L("Followed hashtags..."))), | ||
| 1366 | xs_html_tag("p", | ||
| 1367 | xs_html_text(L("One hashtag per line"))), | ||
| 1368 | xs_html_tag("div", | ||
| 1369 | xs_html_attr("class", "snac-followed-hashtags"), | ||
| 1370 | xs_html_tag("form", | ||
| 1371 | xs_html_attr("autocomplete", "off"), | ||
| 1372 | xs_html_attr("method", "post"), | ||
| 1373 | xs_html_attr("action", followed_hashtags_action), | ||
| 1374 | xs_html_attr("enctype", "multipart/form-data"), | ||
| 1375 | |||
| 1376 | xs_html_tag("textarea", | ||
| 1377 | xs_html_attr("name", "hashtags"), | ||
| 1378 | xs_html_attr("cols", "40"), | ||
| 1379 | xs_html_attr("rows", "4"), | ||
| 1380 | xs_html_attr("placeholder", "#cats\n#windowfriday\n#classicalmusic"), | ||
| 1381 | xs_html_text(followed_hashtags)), | ||
| 1382 | |||
| 1383 | xs_html_tag("br", NULL), | ||
| 1384 | |||
| 1385 | xs_html_sctag("input", | ||
| 1386 | xs_html_attr("type", "submit"), | ||
| 1387 | xs_html_attr("class", "button"), | ||
| 1388 | xs_html_attr("value", L("Update hashtags"))))))); | ||
| 1389 | |||
| 1358 | return top_controls; | 1390 | return top_controls; |
| 1359 | } | 1391 | } |
| 1360 | 1392 | ||