Reporting (#434)

* Updating translations.

* A first pass at reporting. Fixes #102
This commit is contained in:
Dessalines 2021-09-28 06:38:59 -04:00 committed by GitHub
parent 65be5c7833
commit 06099fee8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 1029 additions and 85 deletions

View file

@ -3,6 +3,7 @@ import {
AddModToCommunityResponse,
BanFromCommunityResponse,
BlockPersonResponse,
CommentReportResponse,
CommentResponse,
CommentView,
CommunityResponse,
@ -14,6 +15,7 @@ import {
GetPostsResponse,
GetSiteResponse,
ListingType,
PostReportResponse,
PostResponse,
PostView,
SortType,
@ -549,6 +551,16 @@ export class Community extends Component<any, State> {
} else if (op == UserOperation.BlockPerson) {
let data = wsJsonToRes<BlockPersonResponse>(msg).data;
updatePersonBlock(data);
} else if (op == UserOperation.CreatePostReport) {
let data = wsJsonToRes<PostReportResponse>(msg).data;
if (data) {
toast(i18n.t("report_created"));
}
} else if (op == UserOperation.CreateCommentReport) {
let data = wsJsonToRes<CommentReportResponse>(msg).data;
if (data) {
toast(i18n.t("report_created"));
}
}
}
}