Hide create community (#787)
* Adding post and comment language tagging. Fixes #771 * Hiding create community button. Fixes #754
This commit is contained in:
parent
6320357d21
commit
c6e3a4213a
30 changed files with 321 additions and 36 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue