ModRemovePostView,
ModStickyPostView,
ModTransferCommunityView,
+ PersonSafe,
SiteView,
UserOperation,
} from "lemmy-js-client";
{this.isAdminOrMod ? (
<PersonListing person={i.view.moderator} />
) : (
- <div>{i18n.t("mod")}</div>
+ <div>{this.modOrAdminText(i.view.moderator)}</div>
)}
</td>
<td>{this.renderModlogType(i)}</td>
return isAdmin || isMod;
}
+ modOrAdminText(person: PersonSafe): Text {
+ if (
+ this.isoData.site_res.admins.map(a => a.person.id).includes(person.id)
+ ) {
+ return i18n.t("admin");
+ } else {
+ return i18n.t("mod");
+ }
+ }
+
get documentTitle(): string {
return `Modlog - ${this.state.site_view.site.name}`;
}