diff --git a/src/shared/components/app/app.tsx b/src/shared/components/app/app.tsx index 96857f31..c495548c 100644 --- a/src/shared/components/app/app.tsx +++ b/src/shared/components/app/app.tsx @@ -25,7 +25,7 @@ export class App extends Component { return ( <> -
+
{siteView && ( )} diff --git a/src/shared/components/app/footer.tsx b/src/shared/components/app/footer.tsx index bd66165e..aabe4eff 100644 --- a/src/shared/components/app/footer.tsx +++ b/src/shared/components/app/footer.tsx @@ -16,7 +16,7 @@ export class Footer extends Component { render() { return ( - + ); } } diff --git a/src/shared/components/app/navbar.tsx b/src/shared/components/app/navbar.tsx index 20d4f251..6a57659b 100644 --- a/src/shared/components/app/navbar.tsx +++ b/src/shared/components/app/navbar.tsx @@ -86,8 +86,12 @@ export class Navbar extends Component { const siteView = this.props.siteRes?.site_view; const person = UserService.Instance.myUserInfo?.local_user_view.person; return ( -
+ {showMoreChildren && (
{ focus allLanguages={this.props.allLanguages} siteLanguages={this.props.siteLanguages} + containerClass="comment-comment-container" onUpsertComment={this.props.onCreateComment} /> )} diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index c1e85243..36f6283d 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -62,8 +62,9 @@ export class MarkdownTextArea extends Component< MarkdownTextAreaProps, MarkdownTextAreaState > { - private id = `comment-textarea-${randomStr()}`; - private formId = `comment-form-${randomStr()}`; + private id = `markdown-textarea-${randomStr()}`; + private formId = `markdown-form-${randomStr()}`; + private tribute: any; state: MarkdownTextAreaState = { diff --git a/src/shared/components/community/sidebar.tsx b/src/shared/components/community/sidebar.tsx index 592a06ff..997fe11a 100644 --- a/src/shared/components/community/sidebar.tsx +++ b/src/shared/components/community/sidebar.tsx @@ -131,37 +131,39 @@ export class Sidebar extends Component { const myUSerInfo = UserService.Instance.myUserInfo; const { name, actor_id } = this.props.community_view.community; return ( -
-
-
- {this.communityTitle()} - {this.props.editable && this.adminButtons()} - {myUSerInfo && this.subscribe()} - {this.canPost && this.createPost()} - {myUSerInfo && this.blockCommunity()} - {!myUSerInfo && ( -
- - ### - -
- )} -
+
+ ); } diff --git a/src/shared/components/home/home.tsx b/src/shared/components/home/home.tsx index 3613b0f8..9f7c322f 100644 --- a/src/shared/components/home/home.tsx +++ b/src/shared/components/home/home.tsx @@ -419,35 +419,36 @@ export class Home extends Component { } = this.state; return ( -
-
-
-
- {this.trendingCommunities()} - {canCreateCommunity(this.state.siteRes) && ( - - )} +
+
+
+ {this.trendingCommunities()} + {canCreateCommunity(this.state.siteRes) && ( -
+ )} +
- - {this.hasFollows && ( -
-
{this.subscribedCommunities}
-
- )} -
+ + + {this.hasFollows && ( +
+
{this.subscribedCommunities}
+
+ )}
); } diff --git a/src/shared/components/home/login.tsx b/src/shared/components/home/login.tsx index d7e20ec7..6a270899 100644 --- a/src/shared/components/home/login.tsx +++ b/src/shared/components/home/login.tsx @@ -173,7 +173,7 @@ export class Login extends Component { toast(i18n.t("enter_two_factor_code"), "info"); } - i.setState({ loginRes: { state: "empty" } }); + i.setState({ loginRes: { state: "failed", msg: loginRes.msg } }); break; } diff --git a/src/shared/components/home/site-sidebar.tsx b/src/shared/components/home/site-sidebar.tsx index be7cdf76..8603c36d 100644 --- a/src/shared/components/home/site-sidebar.tsx +++ b/src/shared/components/home/site-sidebar.tsx @@ -29,7 +29,7 @@ export class SiteSidebar extends Component { render() { return ( -
+
{this.siteName()}
@@ -41,7 +41,7 @@ export class SiteSidebar extends Component { )}
-
+ ); } diff --git a/src/shared/components/post/create-post.tsx b/src/shared/components/post/create-post.tsx index f01dd72f..63ee390f 100644 --- a/src/shared/components/post/create-post.tsx +++ b/src/shared/components/post/create-post.tsx @@ -166,7 +166,10 @@ export class CreatePost extends Component< ) : (
-
+
{i18n.t("create_post")}
{ body() { const body = this.postView.post.body; return body ? ( -
+
{this.state.viewSource ? (
{body}
) : (
)} -
+
) : ( <> ); @@ -464,7 +464,7 @@ export class PostListing extends Component { {showScores() ? (
{numToSI(this.postView.counts.score)} @@ -1398,7 +1398,7 @@ export class PostListing extends Component { <> {/* The mobile view*/}
-
+
{this.createdLine()} @@ -1413,14 +1413,14 @@ export class PostListing extends Component { {this.duplicatesLine()} {this.removeAndBanDialogs()}
-
+
{/* The larger view*/}
-
+
{!this.props.viewOnly && this.voteBar()} -
+
{this.thumbnail()}
@@ -1435,7 +1435,7 @@ export class PostListing extends Component {
-
+
); diff --git a/src/shared/components/post/post.tsx b/src/shared/components/post/post.tsx index a471e649..1c4b6816 100644 --- a/src/shared/components/post/post.tsx +++ b/src/shared/components/post/post.tsx @@ -384,6 +384,7 @@ export class Post extends Component { disabled={res.post_view.post.locked} allLanguages={this.state.siteRes.all_languages} siteLanguages={this.state.siteRes.discussion_languages} + containerClass="post-comment-container" onUpsertComment={this.handleCreateComment} finished={this.state.finished.get(0)} /> @@ -547,24 +548,22 @@ export class Post extends Component { const res = this.state.postRes; if (res.state === "success") { return ( -
- -
+ ); } }