New moderation tools: block & mute ()

* initial support for block/mute

* hide blocked + muted content everywhere

* add info message for blocked/muted characteristics

* sort blocked list by most recent block first

* add 'blocked' message on channel page for channels that you have blocked

* cleanup

* delete unused files

* always pass mute/block list to claim_search on homepage

* PR cleanup
This commit is contained in:
Sean Yesmunt 2021-03-03 13:50:16 -05:00 committed by GitHub
parent 277a1d5d1f
commit ea74a66dbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 1115 additions and 877 deletions

View file

@ -6,6 +6,8 @@ const Comments = {
enabled: Boolean(COMMENT_SERVER_API),
moderation_block: (params: ModerationBlockParams) => fetchCommentsApi('moderation.Block', params),
moderation_unblock: (params: ModerationBlockParams) => fetchCommentsApi('moderation.UnBlock', params),
moderation_block_list: (params: ModerationBlockParams) => fetchCommentsApi('moderation.BlockedList', params),
comment_list: (params: CommentListParams) => fetchCommentsApi('comment.List', params),
comment_abandon: (params: CommentAbandonParams) => fetchCommentsApi('comment.Abandon', params),
};
@ -30,8 +32,8 @@ function fetchCommentsApi(method: string, params: {}) {
};
return fetch(url, options)
.then(res => res.json())
.then(res => res.result);
.then((res) => res.json())
.then((res) => res.result);
}
export default Comments;