Hide create community (#787)

* Adding post and comment language tagging. Fixes #771

* Hiding create community button. Fixes #754
This commit is contained in:
Dessalines 2022-09-22 11:14:58 -04:00 committed by GitHub
parent 6320357d21
commit c6e3a4213a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 321 additions and 36 deletions

View file

@ -17,6 +17,7 @@ import {
DeleteComment,
EditComment,
GetComments,
Language,
ListingType,
MarkCommentReplyAsRead,
MarkPersonMentionAsRead,
@ -101,6 +102,7 @@ interface CommentNodeProps {
showCommunity?: boolean;
enableDownvotes: boolean;
viewType: CommentViewType;
allLanguages: Language[];
}
export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
@ -324,6 +326,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
onReplyCancel={this.handleReplyCancel}
disabled={this.props.locked}
focus
allLanguages={this.props.allLanguages}
/>
)}
{!this.state.showEdit && !this.state.collapsed && (
@ -1007,6 +1010,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
onReplyCancel={this.handleReplyCancel}
disabled={this.props.locked}
focus
allLanguages={this.props.allLanguages}
/>
)}
{!this.state.collapsed && node.children.length > 0 && (
@ -1018,6 +1022,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
maxCommentsShown={None}
enableDownvotes={this.props.enableDownvotes}
viewType={this.props.viewType}
allLanguages={this.props.allLanguages}
/>
)}
{/* A collapsed clearfix */}
@ -1264,6 +1269,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
form_id: None, // TODO not sure about this
content: None,
distinguished: Some(!comment.distinguished),
language_id: Some(comment.language_id),
auth: auth().unwrap(),
});
WebSocketService.Instance.send(wsClient.editComment(form));