diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 12 |
1 files changed, 12 insertions, 0 deletions
| @@ -923,7 +923,9 @@ static xs_html *html_user_body(snac *user, int read_only) | |||
| 923 | } | 923 | } |
| 924 | else { | 924 | else { |
| 925 | int n_len = notify_new_num(user); | 925 | int n_len = notify_new_num(user); |
| 926 | int p_len = pending_count(user); | ||
| 926 | xs_html *notify_count = NULL; | 927 | xs_html *notify_count = NULL; |
| 928 | xs_html *pending_follow_count = NULL; | ||
| 927 | 929 | ||
| 928 | /* show the number of new notifications, if there are any */ | 930 | /* show the number of new notifications, if there are any */ |
| 929 | if (n_len) { | 931 | if (n_len) { |
| @@ -935,6 +937,15 @@ static xs_html *html_user_body(snac *user, int read_only) | |||
| 935 | else | 937 | else |
| 936 | notify_count = xs_html_text(""); | 938 | notify_count = xs_html_text(""); |
| 937 | 939 | ||
| 940 | if (p_len) { | ||
| 941 | xs *s = xs_fmt(" %d ", p_len); | ||
| 942 | pending_follow_count = xs_html_tag("sup", | ||
| 943 | xs_html_attr("style", "background-color: red; color: white;"), | ||
| 944 | xs_html_text(s)); | ||
| 945 | } | ||
| 946 | else | ||
| 947 | pending_follow_count = xs_html_text(""); | ||
| 948 | |||
| 938 | xs *admin_url = xs_fmt("%s/admin", user->actor); | 949 | xs *admin_url = xs_fmt("%s/admin", user->actor); |
| 939 | xs *notify_url = xs_fmt("%s/notifications", user->actor); | 950 | xs *notify_url = xs_fmt("%s/notifications", user->actor); |
| 940 | xs *people_url = xs_fmt("%s/people", user->actor); | 951 | xs *people_url = xs_fmt("%s/people", user->actor); |
| @@ -957,6 +968,7 @@ static xs_html *html_user_body(snac *user, int read_only) | |||
| 957 | xs_html_tag("a", | 968 | xs_html_tag("a", |
| 958 | xs_html_attr("href", people_url), | 969 | xs_html_attr("href", people_url), |
| 959 | xs_html_text(L("people"))), | 970 | xs_html_text(L("people"))), |
| 971 | pending_follow_count, | ||
| 960 | xs_html_text(" - "), | 972 | xs_html_text(" - "), |
| 961 | xs_html_tag("a", | 973 | xs_html_tag("a", |
| 962 | xs_html_attr("href", instance_url), | 974 | xs_html_attr("href", instance_url), |