summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/html.c b/html.c
index 86620fb..c834fcf 100644
--- a/html.c
+++ b/html.c
@@ -3704,13 +3704,19 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
3704} 3704}
3705 3705
3706 3706
3707xs_html *html_people_list(snac *user, xs_list *list, const char *header, const char *t, const char *proxy) 3707xs_html *html_people_list(snac *user, xs_list *list, const char *header, const char *t, const char *proxy, int do_count)
3708{ 3708{
3709 xs_html *snac_posts; 3709 xs_html *snac_posts;
3710 const char *header_cnt;
3711 if (do_count)
3712 header_cnt = xs_fmt("%s - %d\n", header, xs_list_len(list));
3713 else
3714 header_cnt = xs_fmt("%s\n", header);
3715
3710 xs_html *people = xs_html_tag("div", 3716 xs_html *people = xs_html_tag("div",
3711 xs_html_tag("h2", 3717 xs_html_tag("h2",
3712 xs_html_attr("class", "snac-header"), 3718 xs_html_attr("class", "snac-header"),
3713 xs_html_raw(xs_fmt("%s - %d\n", header, xs_list_len(list)))), 3719 xs_html_raw(header_cnt)),
3714 snac_posts = xs_html_tag("details", 3720 snac_posts = xs_html_tag("details",
3715 xs_html_attr("open", NULL), 3721 xs_html_attr("open", NULL),
3716 xs_html_tag("summary", 3722 xs_html_tag("summary",
@@ -3951,12 +3957,12 @@ xs_str *html_people(snac *user)
3951 3957
3952 if (xs_list_len(pending) || xs_is_true(xs_dict_get(user->config, "approve_followers"))) { 3958 if (xs_list_len(pending) || xs_is_true(xs_dict_get(user->config, "approve_followers"))) {
3953 xs_html_add(lists, 3959 xs_html_add(lists,
3954 html_people_list(user, pending, L("Pending follow confirmations"), "p", proxy)); 3960 html_people_list(user, pending, L("Pending follow confirmations"), "p", proxy, 1));
3955 } 3961 }
3956 3962
3957 xs_html_add(lists, 3963 xs_html_add(lists,
3958 html_people_list(user, wing, L("People you follow"), "i", proxy), 3964 html_people_list(user, wing, L("People you follow"), "i", proxy, 1),
3959 html_people_list(user, wers, L("People that follow you"), "e", proxy)); 3965 html_people_list(user, wers, L("People that follow you"), "e", proxy, 1));
3960 3966
3961 xs_html *html = xs_html_tag("html", 3967 xs_html *html = xs_html_tag("html",
3962 html_user_head(user, NULL, NULL), 3968 html_user_head(user, NULL, NULL),
@@ -3987,7 +3993,7 @@ xs_str *html_people_one(snac *user, const char *actor, const xs_list *list,
3987 xs *foll = xs_list_append(xs_list_new(), actor); 3993 xs *foll = xs_list_append(xs_list_new(), actor);
3988 3994
3989 xs_html_add(lists, 3995 xs_html_add(lists,
3990 html_people_list(user, foll, L("Contact's posts"), "p", proxy)); 3996 html_people_list(user, foll, L("Contact's posts"), "p", proxy, 0));
3991 3997
3992 xs_html_add(body, lists); 3998 xs_html_add(body, lists);
3993 3999
@@ -4641,7 +4647,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
4641 4647
4642 xs *title = xs_fmt(L("Search results for account %s"), q); 4648 xs *title = xs_fmt(L("Search results for account %s"), q);
4643 4649
4644 page = html_people_list(&snac, l, title, "wf", NULL); 4650 page = html_people_list(&snac, l, title, "wf", NULL, 1);
4645 } 4651 }
4646 } 4652 }
4647 4653