diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 13 |
1 files changed, 12 insertions, 1 deletions
| @@ -435,6 +435,7 @@ d_char *html_entry_controls(snac *snac, d_char *os, char *msg, int num) | |||
| 435 | s = html_button(s, "mute", L("MUTE")); | 435 | s = html_button(s, "mute", L("MUTE")); |
| 436 | } | 436 | } |
| 437 | 437 | ||
| 438 | s = html_button(s, "hide", L("Hide")); | ||
| 438 | s = html_button(s, "delete", L("Delete")); | 439 | s = html_button(s, "delete", L("Delete")); |
| 439 | 440 | ||
| 440 | s = xs_str_cat(s, "</form>\n"); | 441 | s = xs_str_cat(s, "</form>\n"); |
| @@ -489,6 +490,12 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int local, i | |||
| 489 | 490 | ||
| 490 | xs *s = xs_str_new(NULL); | 491 | xs *s = xs_str_new(NULL); |
| 491 | 492 | ||
| 493 | /* top wrap */ | ||
| 494 | if ((v = xs_dict_get(meta, "hidden")) && xs_type(v) == XSTYPE_TRUE) | ||
| 495 | s = xs_str_cat(s, "<div style=\"display: none\">\n"); | ||
| 496 | else | ||
| 497 | s = xs_str_cat(s, "<div>\n"); | ||
| 498 | |||
| 492 | if (level == 0) { | 499 | if (level == 0) { |
| 493 | xs *s1 = xs_fmt("<a name=\"%d_entry\"></a>\n", *num); | 500 | xs *s1 = xs_fmt("<a name=\"%d_entry\"></a>\n", *num); |
| 494 | 501 | ||
| @@ -738,7 +745,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int local, i | |||
| 738 | s = xs_str_cat(s, "</div>\n"); | 745 | s = xs_str_cat(s, "</div>\n"); |
| 739 | } | 746 | } |
| 740 | 747 | ||
| 741 | s = xs_str_cat(s, "</div>\n"); | 748 | s = xs_str_cat(s, "</div>\n</div>\n"); |
| 742 | 749 | ||
| 743 | return xs_str_cat(os, s); | 750 | return xs_str_cat(os, s); |
| 744 | } | 751 | } |
| @@ -1194,6 +1201,10 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, | |||
| 1194 | unmute(&snac, actor); | 1201 | unmute(&snac, actor); |
| 1195 | } | 1202 | } |
| 1196 | else | 1203 | else |
| 1204 | if (strcmp(action, L("Hide")) == 0) { | ||
| 1205 | timeline_hide(&snac, id, 1); | ||
| 1206 | } | ||
| 1207 | else | ||
| 1197 | if (strcmp(action, L("Follow")) == 0) { | 1208 | if (strcmp(action, L("Follow")) == 0) { |
| 1198 | xs *msg = msg_follow(&snac, actor); | 1209 | xs *msg = msg_follow(&snac, actor); |
| 1199 | 1210 | ||