BanFromCommunity,
BanPerson,
BlockPerson,
- CommentNode as CommentNodeI,
CommentReplyView,
CommentView,
CommunityModeratorView,
CreateCommentLike,
CreateCommentReport,
DeleteComment,
- EditComment,
+ DistinguishComment,
GetComments,
Language,
- ListingType,
MarkCommentReplyAsRead,
MarkPersonMentionAsRead,
PersonMentionView,
- PersonViewSafe,
+ PersonView,
PurgeComment,
PurgePerson,
RemoveComment,
} from "lemmy-js-client";
import moment from "moment";
import { i18n } from "../../i18next";
-import { BanType, CommentViewType, PurgeType } from "../../interfaces";
+import {
+ BanType,
+ CommentNodeI,
+ CommentViewType,
+ PurgeType,
+} from "../../interfaces";
import { UserService, WebSocketService } from "../../services";
import {
amCommunityCreator,
interface CommentNodeProps {
node: CommentNodeI;
moderators?: CommunityModeratorView[];
- admins?: PersonViewSafe[];
+ admins?: PersonView[];
noBorder?: boolean;
noIndent?: boolean;
viewOnly?: boolean;
{i18n.t("bot_account").toLowerCase()}
</div>
)}
- {(cv.creator_banned_from_community || isBanned(cv.creator)) && (
- <div className="badge badge-danger mr-2">
- {i18n.t("banned")}
- </div>
- )}
{this.props.showCommunity && (
<>
<span className="mx-1">{i18n.t("to")}</span>
<span
className="mr-1 font-weight-bold"
aria-label={i18n.t("number_of_points", {
- count: this.state.score,
- formattedCount: this.state.score,
+ count: Number(this.state.score),
+ formattedCount: numToSI(this.state.score),
})}
>
{numToSI(this.state.score)}
let comment = i.props.node.comment_view.comment;
let auth = myAuth();
if (auth) {
- let form: EditComment = {
+ let form: DistinguishComment = {
comment_id: comment.id,
distinguished: !comment.distinguished,
auth,
parent_id: i.props.node.comment_view.comment.id,
max_depth: commentTreeMaxDepth,
limit: 999, // TODO
- type_: ListingType.All,
+ type_: "All",
saved_only: false,
auth: myAuth(false),
};
get pointsTippy(): string {
let points = i18n.t("number_of_points", {
- count: this.state.score,
- formattedCount: this.state.score,
+ count: Number(this.state.score),
+ formattedCount: numToSI(this.state.score),
});
let upvotes = i18n.t("number_of_upvotes", {
- count: this.state.upvotes,
- formattedCount: this.state.upvotes,
+ count: Number(this.state.upvotes),
+ formattedCount: numToSI(this.state.upvotes),
});
let downvotes = i18n.t("number_of_downvotes", {
- count: this.state.downvotes,
- formattedCount: this.state.downvotes,
+ count: Number(this.state.downvotes),
+ formattedCount: numToSI(this.state.downvotes),
});
return `${points} • ${upvotes} • ${downvotes}`;