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

@ -5,6 +5,7 @@ import {
AddAdminResponse,
BanPersonResponse,
BlockPersonResponse,
CommentReportResponse,
CommentResponse,
CommentView,
CommunityView,
@ -16,6 +17,7 @@ import {
ListCommunities,
ListCommunitiesResponse,
ListingType,
PostReportResponse,
PostResponse,
PostView,
SiteResponse,
@ -955,6 +957,16 @@ export class Home extends Component<any, HomeState> {
} 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"));
}
}
}
}