"husky": "^7.0.1",
"import-sort-style-module": "^6.0.0",
"iso-639-1": "^2.1.9",
- "lemmy-js-client": "0.11.3-rc.4",
+ "lemmy-js-client": "0.11.4-rc.10",
"lint-staged": "^11.0.1",
"mini-css-extract-plugin": "^2.1.0",
"node-fetch": "^2.6.1",
ModRemoveCommunityView,
ModRemovePostView,
ModStickyPostView,
+ ModTransferCommunityView,
SiteView,
UserOperation,
} from "lemmy-js-client";
ModRemoveCommunity,
ModBanFromCommunity,
ModAddCommunity,
+ ModTransferCommunity,
ModAdd,
ModBan,
}
| ModBanFromCommunityView
| ModBanView
| ModAddCommunityView
+ | ModTransferCommunityView
| ModAddView;
when_: string;
};
banned_from_community: [],
banned: [],
added_to_community: [],
+ transferred_to_community: [],
added: [],
},
page: 1,
when_: r.mod_add_community.when_,
}));
+ let transferred_to_community: ModlogType[] =
+ res.transferred_to_community.map(r => ({
+ id: r.mod_transfer_community.id,
+ type_: ModlogEnum.ModTransferCommunity,
+ view: r,
+ when_: r.mod_transfer_community.when_,
+ }));
+
let added: ModlogType[] = res.added.map(r => ({
id: r.mod_add.id,
type_: ModlogEnum.ModAdd,
combined.push(...removed_communities);
combined.push(...banned_from_community);
combined.push(...added_to_community);
+ combined.push(...transferred_to_community);
combined.push(...added);
combined.push(...banned);
</span>,
];
}
+ case ModlogEnum.ModTransferCommunity: {
+ let mtc = i.view as ModTransferCommunityView;
+ return [
+ <span>
+ {mtc.mod_transfer_community.removed ? "Removed " : "Transferred "}{" "}
+ </span>,
+ <span>
+ <CommunityLink community={mtc.community} />
+ </span>,
+ <span> to </span>,
+ <span>
+ <PersonListing person={mtc.modded_person} />
+ </span>,
+ ];
+ }
case ModlogEnum.ModBan: {
let mb = i.view as ModBanView;
return [
dependencies:
invert-kv "^1.0.0"
-lemmy-js-client@0.11.3-rc.4:
- version "0.11.3-rc.4"
- resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.3-rc.4.tgz#fd6ccad2a959a4ffe243b4a17451159bd8deda44"
- integrity sha512-BWl5jW9KL+UHrwOjyhtSjG3YgCDoAfv9HCORT2EKTk6cfOG98abNOpnGgwvTt4Z2GxJ+5NShQVa4635TTj3PMw==
+lemmy-js-client@0.11.4-rc.10:
+ version "0.11.4-rc.10"
+ resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.11.4-rc.10.tgz#bbb5ae39fcac45c4ff667b1047069fb5148a0526"
+ integrity sha512-8XwC6+jU2dMwlAVUj4HzF7yosHDinUobuhCC3yLJX2J7wgTSvDxEEH8kYXhwfNZpNJrCJTwT+RVx3X0Tl2+CYw==
levn@^0.4.1:
version "0.4.1"