Browse Source

Merge branch 'main' into main

main
WhyEssEff 4 months ago
parent
commit
c89855c4be
  1. 9
      src/components/comment-node.tsx
  2. 2
      src/components/community.tsx
  3. 5
      src/components/post-listing.tsx
  4. 2
      src/components/post.tsx
  5. 3
      translations/en.json

9
src/components/comment-node.tsx

@ -87,11 +87,7 @@ function BaseCommentNode(props: CommentNodeProps) {
const [reportReason, setReportReason] = useState(null);
const [banExpires, setBanExpires] = useState(null);
const [banType, setBanType] = useState<BanType>(BanType.Community);
const [collapsed, setCollapsed] = useState(
props.node.comment.removed ||
props.node.comment.banned ||
props.node.comment.banned_from_community
);
const [collapsed, setCollapsed] = useState(props.node.comment.removed);
const [viewSource, setViewSource] = useState(false);
const [showAdvanced, setShowAdvanced] = useState(false);
const [showConfirmTransferSite, setShowConfirmTransferSite] = useState(false);
@ -523,9 +519,6 @@ function BaseCommentNode(props: CommentNodeProps) {
)}
</span>
{(node.comment.banned_from_community || node.comment.banned) && (
<div className="badge badge-danger mr-2">{i18n.t('banned')}</div>
)}
{props.showCommunity && (
<>
<span className="mx-1">{i18n.t('to')}</span>

2
src/components/community.tsx

@ -237,7 +237,7 @@ export class BaseCommunity extends Component<any, State> {
title={this.state.community.title}
subtitle={'/c/' + this.state.community.name}
details={{
[i18n.t('number_online_label')]: this.state.online,
[i18n.t('number_viewing_label')]: this.state.online,
[i18n.t('members')]: this.state.community
.number_of_subscribers,
}}

5
src/components/post-listing.tsx

@ -1406,11 +1406,6 @@ function BasePostListing(props) {
/>
{post.downvotes}
</Badge>*/}
{(post.banned_from_community || post.banned) && (
<span className="mx-1 badge badge-danger">
{i18n.t('banned')}
</span>
)}
{props.showCommunity && (
<span>
<span> {i18n.t('to')} </span>

2
src/components/post.tsx

@ -336,7 +336,7 @@ export class Post extends Component<any, PostState> {
</StyledLink>
}
details={{
[i18n.t('number_online_label')]: this.state.online,
[i18n.t('number_viewing_label')]: this.state.online,
[i18n.t('members')]: this.state?.community
?.number_of_subscribers,
}}

3
translations/en.json

@ -116,6 +116,7 @@
"number_online": "{{count}} User Online",
"number_online_plural": "{{count}} Users Online",
"number_online_label": "Online",
"number_viewing_label": "Viewing",
"name": "Name",
"title": "Title",
"category": "Category",
@ -316,4 +317,4 @@
"disable_inbox": "Disable Inbox",
"new_user_24h_waiting_period_not_met": "New users must wait 24 hours before sending private messages",
"new_user_5min_waiting_period_not_met": "New users must wait 5 minutes before creating posts or comments"
}
}
Loading…
Cancel
Save