mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Added web UI for limit/unlimit actions.
This commit is contained in:
parent
fff4ff4261
commit
4c6f1a79e4
18
html.c
18
html.c
@ -1488,9 +1488,17 @@ xs_str *html_people_list(snac *snac, xs_str *os, xs_list *list, const char *head
|
|||||||
);
|
);
|
||||||
s = xs_str_cat(s, s1);
|
s = xs_str_cat(s, s1);
|
||||||
|
|
||||||
if (following_check(snac, actor_id))
|
if (following_check(snac, actor_id)) {
|
||||||
s = html_button(s, "unfollow", L("Unfollow"),
|
s = html_button(s, "unfollow", L("Unfollow"),
|
||||||
L("Stop following this user's activity"));
|
L("Stop following this user's activity"));
|
||||||
|
|
||||||
|
if (is_limited(snac, actor_id))
|
||||||
|
s = html_button(s, "unlimit", L("Unlimit"),
|
||||||
|
L("Allow announces (boosts) from this user"));
|
||||||
|
else
|
||||||
|
s = html_button(s, "limit", L("Limit"),
|
||||||
|
L("Block announces (boosts) from this user"));
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
s = html_button(s, "follow", L("Follow"),
|
s = html_button(s, "follow", L("Follow"),
|
||||||
L("Start following this user's activity"));
|
L("Start following this user's activity"));
|
||||||
@ -2169,6 +2177,14 @@ int html_post_handler(const xs_dict *req, const char *q_path,
|
|||||||
hide(&snac, id);
|
hide(&snac, id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
if (strcmp(action, L("Limit")) == 0) { /** **/
|
||||||
|
limit(&snac, actor);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (strcmp(action, L("Unlimit")) == 0) { /** **/
|
||||||
|
unlimit(&snac, actor);
|
||||||
|
}
|
||||||
|
else
|
||||||
if (strcmp(action, L("Follow")) == 0) { /** **/
|
if (strcmp(action, L("Follow")) == 0) { /** **/
|
||||||
xs *msg = msg_follow(&snac, actor);
|
xs *msg = msg_follow(&snac, actor);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user