2022-06-21 21:42:29 +00:00
|
|
|
import { None, Option, Some } from "@sniptt/monads";
|
2022-06-04 16:47:10 +00:00
|
|
|
import { Component, linkEvent } from "inferno";
|
2021-02-22 02:39:04 +00:00
|
|
|
import { Link } from "inferno-router";
|
2020-09-06 16:15:25 +00:00
|
|
|
import {
|
2022-06-23 19:44:05 +00:00
|
|
|
AdminPurgeCommentView,
|
|
|
|
AdminPurgeCommunityView,
|
|
|
|
AdminPurgePersonView,
|
|
|
|
AdminPurgePostView,
|
2021-07-17 20:42:55 +00:00
|
|
|
CommunityModeratorView,
|
|
|
|
GetCommunity,
|
|
|
|
GetCommunityResponse,
|
2020-12-24 01:58:27 +00:00
|
|
|
GetModlog,
|
2020-09-06 16:15:25 +00:00
|
|
|
GetModlogResponse,
|
2022-06-21 21:42:29 +00:00
|
|
|
GetSiteResponse,
|
2021-07-17 20:42:55 +00:00
|
|
|
ModAddCommunityView,
|
|
|
|
ModAddView,
|
|
|
|
ModBanFromCommunityView,
|
|
|
|
ModBanView,
|
2020-12-24 01:58:27 +00:00
|
|
|
ModLockPostView,
|
2022-06-04 16:47:10 +00:00
|
|
|
ModlogActionType,
|
2020-12-24 01:58:27 +00:00
|
|
|
ModRemoveCommentView,
|
|
|
|
ModRemoveCommunityView,
|
2021-07-17 20:42:55 +00:00
|
|
|
ModRemovePostView,
|
|
|
|
ModStickyPostView,
|
2021-08-18 23:07:54 +00:00
|
|
|
ModTransferCommunityView,
|
2022-03-14 20:09:29 +00:00
|
|
|
PersonSafe,
|
2022-06-04 16:47:10 +00:00
|
|
|
toUndefined,
|
2021-07-17 20:42:55 +00:00
|
|
|
UserOperation,
|
2022-06-21 21:42:29 +00:00
|
|
|
wsJsonToRes,
|
|
|
|
wsUserOp,
|
2021-02-22 02:39:04 +00:00
|
|
|
} from "lemmy-js-client";
|
2021-07-17 20:42:55 +00:00
|
|
|
import moment from "moment";
|
|
|
|
import { Subscription } from "rxjs";
|
|
|
|
import { i18n } from "../i18next";
|
|
|
|
import { InitialFetchRequest } from "../interfaces";
|
2022-06-21 21:42:29 +00:00
|
|
|
import { WebSocketService } from "../services";
|
2020-09-09 02:40:36 +00:00
|
|
|
import {
|
2022-06-21 21:42:29 +00:00
|
|
|
amAdmin,
|
|
|
|
amMod,
|
|
|
|
auth,
|
2022-06-04 16:47:10 +00:00
|
|
|
choicesConfig,
|
|
|
|
choicesModLogConfig,
|
|
|
|
debounce,
|
2020-09-09 02:40:36 +00:00
|
|
|
fetchLimit,
|
2022-06-04 16:47:10 +00:00
|
|
|
fetchUsers,
|
2021-07-17 20:42:55 +00:00
|
|
|
isBrowser,
|
2020-09-09 02:40:36 +00:00
|
|
|
setIsoData,
|
2021-07-17 20:42:55 +00:00
|
|
|
toast,
|
|
|
|
wsClient,
|
2020-09-09 02:40:36 +00:00
|
|
|
wsSubscribe,
|
2021-02-22 02:39:04 +00:00
|
|
|
} from "../utils";
|
2021-07-17 20:42:55 +00:00
|
|
|
import { HtmlTags } from "./common/html-tags";
|
|
|
|
import { Spinner } from "./common/icon";
|
|
|
|
import { MomentTime } from "./common/moment-time";
|
|
|
|
import { Paginator } from "./common/paginator";
|
|
|
|
import { CommunityLink } from "./community/community-link";
|
|
|
|
import { PersonListing } from "./person/person-listing";
|
2020-12-24 01:58:27 +00:00
|
|
|
type ModlogType = {
|
|
|
|
id: number;
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType;
|
|
|
|
moderator: Option<PersonSafe>;
|
2020-12-24 01:58:27 +00:00
|
|
|
view:
|
2022-06-04 16:47:10 +00:00
|
|
|
| ModRemovePostView
|
|
|
|
| ModLockPostView
|
|
|
|
| ModStickyPostView
|
|
|
|
| ModRemoveCommentView
|
|
|
|
| ModRemoveCommunityView
|
|
|
|
| ModBanFromCommunityView
|
|
|
|
| ModBanView
|
|
|
|
| ModAddCommunityView
|
|
|
|
| ModTransferCommunityView
|
|
|
|
| ModAddView
|
|
|
|
| AdminPurgePersonView
|
|
|
|
| AdminPurgeCommunityView
|
|
|
|
| AdminPurgePostView
|
|
|
|
| AdminPurgeCommentView;
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: string;
|
|
|
|
};
|
2022-06-04 16:47:10 +00:00
|
|
|
var Choices: any;
|
|
|
|
if (isBrowser()) {
|
|
|
|
Choices = require("choices.js");
|
|
|
|
}
|
2020-09-06 16:15:25 +00:00
|
|
|
|
|
|
|
interface ModlogState {
|
2022-06-21 21:42:29 +00:00
|
|
|
res: Option<GetModlogResponse>;
|
|
|
|
communityId: Option<number>;
|
|
|
|
communityMods: Option<CommunityModeratorView[]>;
|
2022-06-04 16:47:10 +00:00
|
|
|
communityName: Option<string>,
|
2020-09-06 16:15:25 +00:00
|
|
|
page: number;
|
2022-06-21 21:42:29 +00:00
|
|
|
siteRes: GetSiteResponse;
|
2020-09-06 16:15:25 +00:00
|
|
|
loading: boolean;
|
2022-06-04 16:47:10 +00:00
|
|
|
filter_action: ModlogActionType,
|
|
|
|
filter_user: Option<number>,
|
|
|
|
filter_mod: Option<number>,
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class Modlog extends Component<any, ModlogState> {
|
2022-06-21 21:42:29 +00:00
|
|
|
private isoData = setIsoData(
|
|
|
|
this.context,
|
|
|
|
GetModlogResponse,
|
|
|
|
GetCommunityResponse
|
|
|
|
);
|
2020-09-06 16:15:25 +00:00
|
|
|
private subscription: Subscription;
|
2022-06-04 16:47:10 +00:00
|
|
|
private userChoices: any;
|
|
|
|
private modChoices: any;
|
2020-09-06 16:15:25 +00:00
|
|
|
private emptyState: ModlogState = {
|
2022-06-21 21:42:29 +00:00
|
|
|
res: None,
|
|
|
|
communityId: None,
|
|
|
|
communityMods: None,
|
2022-06-04 16:47:10 +00:00
|
|
|
communityName: None,
|
2020-09-06 16:15:25 +00:00
|
|
|
page: 1,
|
|
|
|
loading: true,
|
2022-06-21 21:42:29 +00:00
|
|
|
siteRes: this.isoData.site_res,
|
2022-06-04 16:47:10 +00:00
|
|
|
filter_action: ModlogActionType.All,
|
|
|
|
filter_user: None,
|
|
|
|
filter_mod: None,
|
2020-09-06 16:15:25 +00:00
|
|
|
};
|
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
this.state = this.emptyState;
|
2021-07-16 19:40:56 +00:00
|
|
|
this.handlePageChange = this.handlePageChange.bind(this);
|
|
|
|
|
2020-09-06 16:15:25 +00:00
|
|
|
this.state.communityId = this.props.match.params.community_id
|
2022-06-21 21:42:29 +00:00
|
|
|
? Some(Number(this.props.match.params.community_id))
|
|
|
|
: None;
|
2020-09-06 16:15:25 +00:00
|
|
|
|
2020-09-09 02:40:36 +00:00
|
|
|
this.parseMessage = this.parseMessage.bind(this);
|
|
|
|
this.subscription = wsSubscribe(this.parseMessage);
|
|
|
|
|
|
|
|
// Only fetch the data if coming from another route
|
|
|
|
if (this.isoData.path == this.context.router.route.match.url) {
|
2022-06-21 21:42:29 +00:00
|
|
|
this.state.res = Some(this.isoData.routeData[0] as GetModlogResponse);
|
2021-05-04 22:17:15 +00:00
|
|
|
|
2022-06-23 19:44:05 +00:00
|
|
|
if (this.isoData.routeData[1]) {
|
|
|
|
// Getting the moderators
|
|
|
|
let communityRes = Some(
|
|
|
|
this.isoData.routeData[1] as GetCommunityResponse
|
|
|
|
);
|
|
|
|
this.state.communityMods = communityRes.map(c => c.moderators);
|
|
|
|
}
|
2022-06-21 21:42:29 +00:00
|
|
|
|
|
|
|
this.state.loading = false;
|
2020-09-09 02:40:36 +00:00
|
|
|
} else {
|
|
|
|
this.refetch();
|
|
|
|
}
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
2022-06-04 16:47:10 +00:00
|
|
|
componentDidMount() {
|
|
|
|
this.setupUserFilter();
|
|
|
|
this.setupModFilter();
|
|
|
|
}
|
|
|
|
|
2020-09-06 16:15:25 +00:00
|
|
|
componentWillUnmount() {
|
2020-09-09 02:40:36 +00:00
|
|
|
if (isBrowser()) {
|
|
|
|
this.subscription.unsubscribe();
|
|
|
|
}
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
2020-12-24 01:58:27 +00:00
|
|
|
buildCombined(res: GetModlogResponse): ModlogType[] {
|
|
|
|
let removed_posts: ModlogType[] = res.removed_posts.map(r => ({
|
|
|
|
id: r.mod_remove_post.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModRemovePost,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_remove_post.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let locked_posts: ModlogType[] = res.locked_posts.map(r => ({
|
|
|
|
id: r.mod_lock_post.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModLockPost,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_lock_post.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let stickied_posts: ModlogType[] = res.stickied_posts.map(r => ({
|
|
|
|
id: r.mod_sticky_post.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModStickyPost,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_sticky_post.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let removed_comments: ModlogType[] = res.removed_comments.map(r => ({
|
|
|
|
id: r.mod_remove_comment.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModRemoveComment,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_remove_comment.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let removed_communities: ModlogType[] = res.removed_communities.map(r => ({
|
|
|
|
id: r.mod_remove_community.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModRemoveCommunity,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_remove_community.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let banned_from_community: ModlogType[] = res.banned_from_community.map(
|
|
|
|
r => ({
|
|
|
|
id: r.mod_ban_from_community.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModBanFromCommunity,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_ban_from_community.when_,
|
|
|
|
})
|
2020-09-06 16:15:25 +00:00
|
|
|
);
|
2020-12-24 01:58:27 +00:00
|
|
|
|
|
|
|
let added_to_community: ModlogType[] = res.added_to_community.map(r => ({
|
|
|
|
id: r.mod_add_community.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModAddCommunity,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_add_community.when_,
|
|
|
|
}));
|
|
|
|
|
2021-08-18 23:07:54 +00:00
|
|
|
let transferred_to_community: ModlogType[] =
|
|
|
|
res.transferred_to_community.map(r => ({
|
|
|
|
id: r.mod_transfer_community.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModTransferCommunity,
|
2021-08-18 23:07:54 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2021-08-18 23:07:54 +00:00
|
|
|
when_: r.mod_transfer_community.when_,
|
|
|
|
}));
|
|
|
|
|
2020-12-24 01:58:27 +00:00
|
|
|
let added: ModlogType[] = res.added.map(r => ({
|
|
|
|
id: r.mod_add.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModAdd,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_add.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let banned: ModlogType[] = res.banned.map(r => ({
|
|
|
|
id: r.mod_ban.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.ModBan,
|
2020-12-24 01:58:27 +00:00
|
|
|
view: r,
|
2022-06-23 19:44:05 +00:00
|
|
|
moderator: r.moderator,
|
2020-12-24 01:58:27 +00:00
|
|
|
when_: r.mod_ban.when_,
|
|
|
|
}));
|
|
|
|
|
2022-06-23 19:44:05 +00:00
|
|
|
let purged_persons: ModlogType[] = res.admin_purged_persons.map(r => ({
|
|
|
|
id: r.admin_purge_person.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.AdminPurgePerson,
|
2022-06-23 19:44:05 +00:00
|
|
|
view: r,
|
|
|
|
moderator: r.admin,
|
|
|
|
when_: r.admin_purge_person.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let purged_communities: ModlogType[] = res.admin_purged_communities.map(
|
|
|
|
r => ({
|
|
|
|
id: r.admin_purge_community.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.AdminPurgeCommunity,
|
2022-06-23 19:44:05 +00:00
|
|
|
view: r,
|
|
|
|
moderator: r.admin,
|
|
|
|
when_: r.admin_purge_community.when_,
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
let purged_posts: ModlogType[] = res.admin_purged_posts.map(r => ({
|
|
|
|
id: r.admin_purge_post.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.AdminPurgePost,
|
2022-06-23 19:44:05 +00:00
|
|
|
view: r,
|
|
|
|
moderator: r.admin,
|
|
|
|
when_: r.admin_purge_post.when_,
|
|
|
|
}));
|
|
|
|
|
|
|
|
let purged_comments: ModlogType[] = res.admin_purged_comments.map(r => ({
|
|
|
|
id: r.admin_purge_comment.id,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.AdminPurgeComment,
|
2022-06-23 19:44:05 +00:00
|
|
|
view: r,
|
|
|
|
moderator: r.admin,
|
|
|
|
when_: r.admin_purge_comment.when_,
|
|
|
|
}));
|
|
|
|
|
2020-12-24 01:58:27 +00:00
|
|
|
let combined: ModlogType[] = [];
|
|
|
|
|
|
|
|
combined.push(...removed_posts);
|
|
|
|
combined.push(...locked_posts);
|
|
|
|
combined.push(...stickied_posts);
|
|
|
|
combined.push(...removed_comments);
|
|
|
|
combined.push(...removed_communities);
|
|
|
|
combined.push(...banned_from_community);
|
|
|
|
combined.push(...added_to_community);
|
2021-08-18 23:07:54 +00:00
|
|
|
combined.push(...transferred_to_community);
|
2020-12-24 01:58:27 +00:00
|
|
|
combined.push(...added);
|
|
|
|
combined.push(...banned);
|
2022-06-23 19:44:05 +00:00
|
|
|
combined.push(...purged_persons);
|
|
|
|
combined.push(...purged_communities);
|
|
|
|
combined.push(...purged_posts);
|
|
|
|
combined.push(...purged_comments);
|
2020-12-24 01:58:27 +00:00
|
|
|
|
2020-09-06 16:15:25 +00:00
|
|
|
// Sort them by time
|
2020-12-24 01:58:27 +00:00
|
|
|
combined.sort((a, b) => b.when_.localeCompare(a.when_));
|
|
|
|
|
|
|
|
return combined;
|
|
|
|
}
|
|
|
|
|
|
|
|
renderModlogType(i: ModlogType) {
|
|
|
|
switch (i.type_) {
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModRemovePost: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mrpv = i.view as ModRemovePostView;
|
|
|
|
return [
|
2022-06-23 19:44:05 +00:00
|
|
|
mrpv.mod_remove_post.removed.unwrapOr(false)
|
|
|
|
? "Removed "
|
|
|
|
: "Restored ",
|
2020-12-24 01:58:27 +00:00
|
|
|
<span>
|
|
|
|
Post <Link to={`/post/${mrpv.post.id}`}>{mrpv.post.name}</Link>
|
|
|
|
</span>,
|
2022-06-23 19:44:05 +00:00
|
|
|
mrpv.mod_remove_post.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
2020-12-24 01:58:27 +00:00
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModLockPost: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mlpv = i.view as ModLockPostView;
|
|
|
|
return [
|
2022-06-23 19:44:05 +00:00
|
|
|
mlpv.mod_lock_post.locked.unwrapOr(false) ? "Locked " : "Unlocked ",
|
2020-12-24 01:58:27 +00:00
|
|
|
<span>
|
|
|
|
Post <Link to={`/post/${mlpv.post.id}`}>{mlpv.post.name}</Link>
|
|
|
|
</span>,
|
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModStickyPost: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mspv = i.view as ModStickyPostView;
|
|
|
|
return [
|
2022-06-23 19:44:05 +00:00
|
|
|
mspv.mod_sticky_post.stickied.unwrapOr(false)
|
|
|
|
? "Stickied "
|
|
|
|
: "Unstickied ",
|
2020-12-24 01:58:27 +00:00
|
|
|
<span>
|
|
|
|
Post <Link to={`/post/${mspv.post.id}`}>{mspv.post.name}</Link>
|
|
|
|
</span>,
|
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModRemoveComment: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mrc = i.view as ModRemoveCommentView;
|
|
|
|
return [
|
2022-06-23 19:44:05 +00:00
|
|
|
mrc.mod_remove_comment.removed.unwrapOr(false)
|
|
|
|
? "Removed "
|
|
|
|
: "Restored ",
|
2020-12-24 01:58:27 +00:00
|
|
|
<span>
|
2021-02-22 02:39:04 +00:00
|
|
|
Comment{" "}
|
2020-12-24 01:58:27 +00:00
|
|
|
<Link to={`/post/${mrc.post.id}/comment/${mrc.comment.id}`}>
|
|
|
|
{mrc.comment.content}
|
|
|
|
</Link>
|
|
|
|
</span>,
|
|
|
|
<span>
|
2021-02-22 02:39:04 +00:00
|
|
|
{" "}
|
2021-03-15 18:09:31 +00:00
|
|
|
by <PersonListing person={mrc.commenter} />
|
2020-12-24 01:58:27 +00:00
|
|
|
</span>,
|
2022-06-23 19:44:05 +00:00
|
|
|
mrc.mod_remove_comment.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
2020-12-24 01:58:27 +00:00
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModRemoveCommunity: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mrco = i.view as ModRemoveCommunityView;
|
|
|
|
return [
|
2022-06-23 19:44:05 +00:00
|
|
|
mrco.mod_remove_community.removed.unwrapOr(false)
|
|
|
|
? "Removed "
|
|
|
|
: "Restored ",
|
2020-12-24 01:58:27 +00:00
|
|
|
<span>
|
|
|
|
Community <CommunityLink community={mrco.community} />
|
|
|
|
</span>,
|
2022-06-23 19:44:05 +00:00
|
|
|
mrco.mod_remove_community.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
|
|
|
mrco.mod_remove_community.expires.match({
|
|
|
|
some: expires => (
|
|
|
|
<div>expires: {moment.utc(expires).fromNow()}</div>
|
|
|
|
),
|
|
|
|
none: <></>,
|
|
|
|
}),
|
2020-12-24 01:58:27 +00:00
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModBanFromCommunity: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mbfc = i.view as ModBanFromCommunityView;
|
|
|
|
return [
|
|
|
|
<span>
|
2022-06-23 19:44:05 +00:00
|
|
|
{mbfc.mod_ban_from_community.banned.unwrapOr(false)
|
|
|
|
? "Banned "
|
|
|
|
: "Unbanned "}{" "}
|
2020-12-24 01:58:27 +00:00
|
|
|
</span>,
|
|
|
|
<span>
|
2021-03-15 18:09:31 +00:00
|
|
|
<PersonListing person={mbfc.banned_person} />
|
2020-12-24 01:58:27 +00:00
|
|
|
</span>,
|
|
|
|
<span> from the community </span>,
|
|
|
|
<span>
|
|
|
|
<CommunityLink community={mbfc.community} />
|
|
|
|
</span>,
|
2022-06-23 19:44:05 +00:00
|
|
|
mbfc.mod_ban_from_community.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
|
|
|
mbfc.mod_ban_from_community.expires.match({
|
|
|
|
some: expires => (
|
|
|
|
<div>expires: {moment.utc(expires).fromNow()}</div>
|
|
|
|
),
|
|
|
|
none: <></>,
|
|
|
|
}),
|
2020-12-24 01:58:27 +00:00
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModAddCommunity: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mac = i.view as ModAddCommunityView;
|
|
|
|
return [
|
|
|
|
<span>
|
2022-06-23 19:44:05 +00:00
|
|
|
{mac.mod_add_community.removed.unwrapOr(false)
|
|
|
|
? "Removed "
|
|
|
|
: "Appointed "}{" "}
|
2020-12-24 01:58:27 +00:00
|
|
|
</span>,
|
|
|
|
<span>
|
2021-03-15 18:09:31 +00:00
|
|
|
<PersonListing person={mac.modded_person} />
|
2020-12-24 01:58:27 +00:00
|
|
|
</span>,
|
|
|
|
<span> as a mod to the community </span>,
|
|
|
|
<span>
|
|
|
|
<CommunityLink community={mac.community} />
|
|
|
|
</span>,
|
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModTransferCommunity: {
|
2021-08-18 23:07:54 +00:00
|
|
|
let mtc = i.view as ModTransferCommunityView;
|
|
|
|
return [
|
|
|
|
<span>
|
2022-06-23 19:44:05 +00:00
|
|
|
{mtc.mod_transfer_community.removed.unwrapOr(false)
|
|
|
|
? "Removed "
|
|
|
|
: "Transferred "}{" "}
|
2021-08-18 23:07:54 +00:00
|
|
|
</span>,
|
|
|
|
<span>
|
|
|
|
<CommunityLink community={mtc.community} />
|
|
|
|
</span>,
|
|
|
|
<span> to </span>,
|
|
|
|
<span>
|
|
|
|
<PersonListing person={mtc.modded_person} />
|
|
|
|
</span>,
|
|
|
|
];
|
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModBan: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let mb = i.view as ModBanView;
|
|
|
|
return [
|
2022-06-23 19:44:05 +00:00
|
|
|
<span>
|
|
|
|
{mb.mod_ban.banned.unwrapOr(false) ? "Banned " : "Unbanned "}{" "}
|
|
|
|
</span>,
|
2020-12-24 01:58:27 +00:00
|
|
|
<span>
|
2021-03-15 18:09:31 +00:00
|
|
|
<PersonListing person={mb.banned_person} />
|
2020-12-24 01:58:27 +00:00
|
|
|
</span>,
|
2022-06-23 19:44:05 +00:00
|
|
|
mb.mod_ban.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
|
|
|
mb.mod_ban.expires.match({
|
|
|
|
some: expires => (
|
|
|
|
<div>expires: {moment.utc(expires).fromNow()}</div>
|
|
|
|
),
|
|
|
|
none: <></>,
|
|
|
|
}),
|
2020-12-24 01:58:27 +00:00
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.ModAdd: {
|
2020-12-24 01:58:27 +00:00
|
|
|
let ma = i.view as ModAddView;
|
|
|
|
return [
|
2022-06-21 21:42:29 +00:00
|
|
|
<span>
|
2022-06-23 19:44:05 +00:00
|
|
|
{ma.mod_add.removed.unwrapOr(false) ? "Removed " : "Appointed "}{" "}
|
2022-06-21 21:42:29 +00:00
|
|
|
</span>,
|
2020-12-24 01:58:27 +00:00
|
|
|
<span>
|
2021-03-15 18:09:31 +00:00
|
|
|
<PersonListing person={ma.modded_person} />
|
2020-12-24 01:58:27 +00:00
|
|
|
</span>,
|
|
|
|
<span> as an admin </span>,
|
|
|
|
];
|
2021-02-22 02:24:09 +00:00
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.AdminPurgePerson: {
|
2022-06-23 19:44:05 +00:00
|
|
|
let ap = i.view as AdminPurgePersonView;
|
|
|
|
return [
|
|
|
|
<span>Purged a Person</span>,
|
|
|
|
ap.admin_purge_person.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
|
|
|
];
|
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.AdminPurgeCommunity: {
|
2022-06-23 19:44:05 +00:00
|
|
|
let ap = i.view as AdminPurgeCommunityView;
|
|
|
|
return [
|
|
|
|
<span>Purged a Community</span>,
|
|
|
|
ap.admin_purge_community.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
|
|
|
];
|
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.AdminPurgePost: {
|
2022-06-23 19:44:05 +00:00
|
|
|
let ap = i.view as AdminPurgePostView;
|
|
|
|
return [
|
|
|
|
<span>Purged a Post from from </span>,
|
|
|
|
<CommunityLink community={ap.community} />,
|
|
|
|
ap.admin_purge_post.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
|
|
|
];
|
|
|
|
}
|
2022-06-04 16:47:10 +00:00
|
|
|
case ModlogActionType.AdminPurgeComment: {
|
2022-06-23 19:44:05 +00:00
|
|
|
let ap = i.view as AdminPurgeCommentView;
|
|
|
|
return [
|
|
|
|
<span>
|
|
|
|
Purged a Comment from{" "}
|
|
|
|
<Link to={`/post/${ap.post.id}`}>{ap.post.name}</Link>
|
|
|
|
</span>,
|
|
|
|
ap.admin_purge_comment.reason.match({
|
|
|
|
some: reason => <div>reason: {reason}</div>,
|
|
|
|
none: <></>,
|
|
|
|
}),
|
|
|
|
];
|
|
|
|
}
|
2020-12-24 01:58:27 +00:00
|
|
|
default:
|
|
|
|
return <div />;
|
|
|
|
}
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
combined() {
|
2022-06-21 21:42:29 +00:00
|
|
|
let combined = this.state.res.map(this.buildCombined).unwrapOr([]);
|
2020-12-24 01:58:27 +00:00
|
|
|
|
2020-09-06 16:15:25 +00:00
|
|
|
return (
|
|
|
|
<tbody>
|
2020-12-24 01:58:27 +00:00
|
|
|
{combined.map(i => (
|
2020-09-06 16:15:25 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2022-06-21 21:42:29 +00:00
|
|
|
<MomentTime published={i.when_} updated={None} />
|
2020-09-06 16:15:25 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2022-06-21 21:42:29 +00:00
|
|
|
{this.amAdminOrMod ? (
|
2022-06-04 16:47:10 +00:00
|
|
|
<PersonListing person={i.moderator.unwrap()} />
|
2021-05-04 22:17:15 +00:00
|
|
|
) : (
|
2022-06-23 19:44:05 +00:00
|
|
|
<div>{this.modOrAdminText(i.moderator)}</div>
|
2021-05-04 22:17:15 +00:00
|
|
|
)}
|
2020-09-06 16:15:25 +00:00
|
|
|
</td>
|
2020-12-24 01:58:27 +00:00
|
|
|
<td>{this.renderModlogType(i)}</td>
|
2020-09-06 16:15:25 +00:00
|
|
|
</tr>
|
|
|
|
))}
|
|
|
|
</tbody>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-06-21 21:42:29 +00:00
|
|
|
get amAdminOrMod(): boolean {
|
|
|
|
return (
|
|
|
|
amAdmin(Some(this.state.siteRes.admins)) ||
|
|
|
|
amMod(this.state.communityMods)
|
|
|
|
);
|
2021-05-04 22:17:15 +00:00
|
|
|
}
|
|
|
|
|
2022-06-04 16:47:10 +00:00
|
|
|
modOrAdminText(person: Option<PersonSafe>): string {
|
|
|
|
return person.match({
|
|
|
|
some: res => this.isoData.site_res.admins.map(a => a.person.id).includes(res.id) ? i18n.t("admin") : i18n.t("mod"),
|
|
|
|
none: i18n.t("mod"),
|
|
|
|
});
|
2022-03-14 20:09:29 +00:00
|
|
|
}
|
|
|
|
|
2020-09-06 16:15:25 +00:00
|
|
|
get documentTitle(): string {
|
2022-06-21 21:42:29 +00:00
|
|
|
return this.state.siteRes.site_view.match({
|
|
|
|
some: siteView => `Modlog - ${siteView.site.name}`,
|
|
|
|
none: "",
|
|
|
|
});
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2022-06-04 16:47:10 +00:00
|
|
|
<div className="container">
|
2020-09-11 18:09:21 +00:00
|
|
|
<HtmlTags
|
|
|
|
title={this.documentTitle}
|
|
|
|
path={this.context.router.route.match.url}
|
2022-06-21 21:42:29 +00:00
|
|
|
description={None}
|
|
|
|
image={None}
|
2020-09-11 18:09:21 +00:00
|
|
|
/>
|
2020-09-06 16:15:25 +00:00
|
|
|
{this.state.loading ? (
|
2021-02-11 20:35:27 +00:00
|
|
|
<h5>
|
2021-07-17 20:21:31 +00:00
|
|
|
<Spinner large />
|
2020-09-06 16:15:25 +00:00
|
|
|
</h5>
|
|
|
|
) : (
|
|
|
|
<div>
|
2022-06-04 16:47:10 +00:00
|
|
|
<h5>
|
|
|
|
{this.state.communityName.isSome() && (
|
|
|
|
<Link
|
|
|
|
className="text-body"
|
|
|
|
to={`/c/${this.state.communityName}`}
|
|
|
|
>
|
|
|
|
/c/{this.state.communityName}{" "}
|
|
|
|
</Link>
|
|
|
|
)}
|
|
|
|
<span>{i18n.t("modlog")}</span>
|
|
|
|
</h5>
|
|
|
|
<form className="form-inline mr-2">
|
|
|
|
<select
|
|
|
|
value={this.state.filter_action}
|
|
|
|
onChange={linkEvent(this, this.handleFilterActionChange)}
|
|
|
|
className="custom-select col-4 mb-2"
|
|
|
|
aria-label="action">
|
|
|
|
<option disabled aria-hidden="true">{i18n.t("filter_by_action")}</option>
|
|
|
|
<option value={ModlogActionType.All}>{i18n.t("all")}</option>
|
|
|
|
<option value={ModlogActionType.ModRemovePost}>Removing Posts</option>
|
|
|
|
<option value={ModlogActionType.ModLockPost}>Locking Posts</option>
|
|
|
|
<option value={ModlogActionType.ModStickyPost}>Stickying Posts</option>
|
|
|
|
<option value={ModlogActionType.ModRemoveComment}>Removing Comments</option>
|
|
|
|
<option value={ModlogActionType.ModRemoveCommunity}>Removing Communities</option>
|
|
|
|
<option value={ModlogActionType.ModBanFromCommunity}>Banning From Communities</option>
|
|
|
|
<option value={ModlogActionType.ModAddCommunity}>Adding Mod to Community</option>
|
|
|
|
<option value={ModlogActionType.ModTransferCommunity}>Transfering Communities</option>
|
|
|
|
<option value={ModlogActionType.ModAdd}>Adding Mod to Site</option>
|
|
|
|
<option value={ModlogActionType.ModBan}>Banning From Site</option>
|
|
|
|
</select>
|
|
|
|
{
|
|
|
|
this.state.siteRes.site_view.match({
|
|
|
|
some: site_view => !site_view.site.hide_modlog_mod_names.unwrapOr(false) && (
|
|
|
|
<select
|
|
|
|
id="filter-mod"
|
|
|
|
value={toUndefined(this.state.filter_mod)}>
|
|
|
|
<option>{i18n.t("filter_by_mod")}</option>
|
|
|
|
</select>
|
|
|
|
),
|
|
|
|
none: <></>,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
<select
|
|
|
|
id="filter-user"
|
|
|
|
value={toUndefined(this.state.filter_user)}>
|
|
|
|
<option>{i18n.t("filter_by_user")}</option>
|
|
|
|
</select>
|
|
|
|
</form>
|
|
|
|
<div className="table-responsive">
|
|
|
|
<table id="modlog_table" className="table table-sm table-hover">
|
|
|
|
<thead className="pointer">
|
2020-09-06 16:15:25 +00:00
|
|
|
<tr>
|
2021-02-22 02:39:04 +00:00
|
|
|
<th> {i18n.t("time")}</th>
|
|
|
|
<th>{i18n.t("mod")}</th>
|
|
|
|
<th>{i18n.t("action")}</th>
|
2020-09-06 16:15:25 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{this.combined()}
|
|
|
|
</table>
|
2021-07-16 19:40:56 +00:00
|
|
|
<Paginator
|
|
|
|
page={this.state.page}
|
|
|
|
onChange={this.handlePageChange}
|
|
|
|
/>
|
2020-09-06 16:15:25 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-06-04 16:47:10 +00:00
|
|
|
handleFilterActionChange(i: Modlog, event: any) {
|
|
|
|
i.setState({ filter_action: event.target.value });
|
|
|
|
i.refetch();
|
|
|
|
}
|
|
|
|
|
2021-07-16 19:40:56 +00:00
|
|
|
handlePageChange(val: number) {
|
|
|
|
this.setState({ page: val });
|
|
|
|
this.refetch();
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
refetch() {
|
2022-06-21 21:42:29 +00:00
|
|
|
let modlogForm = new GetModlog({
|
2020-09-06 16:15:25 +00:00
|
|
|
community_id: this.state.communityId,
|
2022-06-21 21:42:29 +00:00
|
|
|
page: Some(this.state.page),
|
|
|
|
limit: Some(fetchLimit),
|
|
|
|
auth: auth(false).ok(),
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: this.state.filter_action,
|
|
|
|
other_person_id: this.state.filter_user,
|
|
|
|
mod_person_id: this.state.filter_mod,
|
2022-06-21 21:42:29 +00:00
|
|
|
});
|
2020-12-24 22:05:57 +00:00
|
|
|
WebSocketService.Instance.send(wsClient.getModlog(modlogForm));
|
2021-05-04 22:17:15 +00:00
|
|
|
|
2022-06-21 21:42:29 +00:00
|
|
|
this.state.communityId.match({
|
|
|
|
some: id => {
|
|
|
|
let communityForm = new GetCommunity({
|
|
|
|
id: Some(id),
|
|
|
|
name: None,
|
|
|
|
auth: auth(false).ok(),
|
|
|
|
});
|
|
|
|
WebSocketService.Instance.send(wsClient.getCommunity(communityForm));
|
|
|
|
},
|
|
|
|
none: void 0,
|
|
|
|
});
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
|
2022-06-04 16:47:10 +00:00
|
|
|
setupUserFilter() {
|
|
|
|
if (isBrowser()) {
|
|
|
|
let selectId: any = document.getElementById("filter-user");
|
|
|
|
if (selectId) {
|
|
|
|
this.userChoices = new Choices(selectId, choicesModLogConfig);
|
|
|
|
this.userChoices.passedElement.element.addEventListener(
|
|
|
|
"choice",
|
|
|
|
(e: any) => {
|
|
|
|
this.state.filter_user = Some(Number(e.detail.choice.value));
|
|
|
|
this.setState(this.state);
|
|
|
|
this.refetch();
|
|
|
|
},
|
|
|
|
false
|
|
|
|
);
|
|
|
|
this.userChoices.passedElement.element.addEventListener(
|
|
|
|
"search",
|
|
|
|
debounce(async (e: any) => {
|
|
|
|
try {
|
|
|
|
let users = (await fetchUsers(e.detail.value)).users;
|
|
|
|
this.userChoices.setChoices(
|
|
|
|
users.map(u => {return {
|
|
|
|
value: u.person.id.toString(),
|
|
|
|
label: u.person.name,
|
|
|
|
}}),
|
|
|
|
"value",
|
|
|
|
"label",
|
|
|
|
true
|
|
|
|
);
|
|
|
|
} catch (err) {
|
|
|
|
console.log(err);
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
false
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
setupModFilter() {
|
|
|
|
if (isBrowser()) {
|
|
|
|
let selectId: any = document.getElementById("filter-mod");
|
|
|
|
if (selectId) {
|
|
|
|
this.modChoices = new Choices(selectId, choicesModLogConfig);
|
|
|
|
this.modChoices.passedElement.element.addEventListener(
|
|
|
|
"choice",
|
|
|
|
(e: any) => {
|
|
|
|
this.state.filter_mod = Some(Number(e.detail.choice.value));
|
|
|
|
this.setState(this.state);
|
|
|
|
this.refetch();
|
|
|
|
},
|
|
|
|
false
|
|
|
|
);
|
|
|
|
this.modChoices.passedElement.element.addEventListener(
|
|
|
|
"search",
|
|
|
|
debounce(async (e: any) => {
|
|
|
|
try {
|
|
|
|
let mods = (await fetchUsers(e.detail.value)).users;
|
|
|
|
this.modChoices.setChoices(
|
|
|
|
mods.map(u => {return {
|
|
|
|
value: u.person.id.toString(),
|
|
|
|
label: u.person.name,
|
|
|
|
}}),
|
|
|
|
"value",
|
|
|
|
"label",
|
|
|
|
true
|
|
|
|
);
|
|
|
|
} catch (err) {
|
|
|
|
console.log(err);
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
false
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-12 21:56:46 +00:00
|
|
|
static fetchInitialData(req: InitialFetchRequest): Promise<any>[] {
|
2021-02-22 02:39:04 +00:00
|
|
|
let pathSplit = req.path.split("/");
|
2022-06-21 21:42:29 +00:00
|
|
|
let communityId = Some(pathSplit[3]).map(Number);
|
2020-09-09 02:40:36 +00:00
|
|
|
let promises: Promise<any>[] = [];
|
|
|
|
|
2022-06-21 21:42:29 +00:00
|
|
|
let modlogForm = new GetModlog({
|
|
|
|
page: Some(1),
|
|
|
|
limit: Some(fetchLimit),
|
|
|
|
community_id: communityId,
|
|
|
|
mod_person_id: None,
|
|
|
|
auth: req.auth,
|
2022-06-04 16:47:10 +00:00
|
|
|
type_: ModlogActionType.All,
|
|
|
|
other_person_id: None
|
2022-06-21 21:42:29 +00:00
|
|
|
});
|
2020-09-09 02:40:36 +00:00
|
|
|
|
2020-11-12 21:56:46 +00:00
|
|
|
promises.push(req.client.getModlog(modlogForm));
|
2021-05-04 22:17:15 +00:00
|
|
|
|
2022-06-21 21:42:29 +00:00
|
|
|
if (communityId.isSome()) {
|
|
|
|
let communityForm = new GetCommunity({
|
|
|
|
id: communityId,
|
|
|
|
name: None,
|
|
|
|
auth: req.auth,
|
|
|
|
});
|
2021-05-04 22:17:15 +00:00
|
|
|
promises.push(req.client.getCommunity(communityForm));
|
2022-06-21 21:42:29 +00:00
|
|
|
} else {
|
|
|
|
promises.push(Promise.resolve());
|
2021-05-04 22:17:15 +00:00
|
|
|
}
|
2020-09-09 02:40:36 +00:00
|
|
|
return promises;
|
|
|
|
}
|
|
|
|
|
2020-12-24 01:58:27 +00:00
|
|
|
parseMessage(msg: any) {
|
|
|
|
let op = wsUserOp(msg);
|
2021-04-07 15:54:38 +00:00
|
|
|
console.log(msg);
|
2020-09-06 16:15:25 +00:00
|
|
|
if (msg.error) {
|
2021-02-22 02:39:04 +00:00
|
|
|
toast(i18n.t(msg.error), "danger");
|
2020-09-06 16:15:25 +00:00
|
|
|
return;
|
2020-12-24 01:58:27 +00:00
|
|
|
} else if (op == UserOperation.GetModlog) {
|
2022-06-21 21:42:29 +00:00
|
|
|
let data = wsJsonToRes<GetModlogResponse>(msg, GetModlogResponse);
|
2020-09-06 16:15:25 +00:00
|
|
|
this.state.loading = false;
|
|
|
|
window.scrollTo(0, 0);
|
2022-06-21 21:42:29 +00:00
|
|
|
this.state.res = Some(data);
|
2020-09-06 16:15:25 +00:00
|
|
|
this.setState(this.state);
|
2021-05-04 22:17:15 +00:00
|
|
|
} else if (op == UserOperation.GetCommunity) {
|
2022-06-21 21:42:29 +00:00
|
|
|
let data = wsJsonToRes<GetCommunityResponse>(msg, GetCommunityResponse);
|
|
|
|
this.state.communityMods = Some(data.moderators);
|
2022-06-04 16:47:10 +00:00
|
|
|
this.state.communityName = Some(data.community_view.community.name);
|
2020-09-06 16:15:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|