From b228214cd06b15c0a5346e4ae9d1b1c6479148e8 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Fri, 16 Jun 2023 09:53:46 -0500 Subject: [PATCH 1/3] Re-arrange elements beneath markdown textarea #1057 (#1288) Co-authored-by: SleeplessOne1917 Co-authored-by: Dessalines --- .../components/common/markdown-textarea.tsx | 98 ++++++++++--------- 1 file changed, 51 insertions(+), 47 deletions(-) diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index 9318d3bb..a4459ac0 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -184,53 +184,6 @@ export class MarkdownTextArea extends Component<
- {this.props.buttonTitle && ( - - )} - {this.props.replyType && ( - - )} - {this.state.content && ( - - )} - {/* A flex expander */} -
- - {this.props.showLanguage && ( - - )} {this.getFormatButton("bold", this.handleInsertBold)} {this.getFormatButton("italic", this.handleInsertItalic)} {this.getFormatButton("link", this.handleInsertLink)} @@ -283,6 +236,57 @@ export class MarkdownTextArea extends Component<
+ +
+ {this.props.showLanguage && ( + + )} + + {/* A flex expander */} +
+ + {this.props.buttonTitle && ( + + )} + {this.props.replyType && ( + + )} + {this.state.content && ( + + )} +
); From 1c26a85fff7fea0f2504fa7f4b75006d389bbdb6 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 16 Jun 2023 15:00:01 +0000 Subject: [PATCH 2/3] Make community IDs more easily selectable (#1306) * Make community IDs more easily selectable * Use T component for alert * Use T component for alert --------- Co-authored-by: SleeplessOne1917 Co-authored-by: Dessalines --- src/shared/components/community/sidebar.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/shared/components/community/sidebar.tsx b/src/shared/components/community/sidebar.tsx index a5c620f3..63378a18 100644 --- a/src/shared/components/community/sidebar.tsx +++ b/src/shared/components/community/sidebar.tsx @@ -1,4 +1,5 @@ import { Component, InfernoNode, linkEvent } from "inferno"; +import { T } from "inferno-i18next-dess"; import { Link } from "inferno-router"; import { AddModToCommunity, @@ -144,10 +145,15 @@ export class Sidebar extends Component { {myUSerInfo && this.blockCommunity()} {!myUSerInfo && (
- {i18n.t("community_not_logged_in_alert", { - community: name, - instance: hostname(actor_id), - })} + + ### +
)} From 64191f2d2104aa5e145ff7f25aef83a983a16f37 Mon Sep 17 00:00:00 2001 From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Fri, 16 Jun 2023 11:02:28 -0400 Subject: [PATCH 3/3] set loading state attribute to false if createPost fails (#1311) Co-authored-by: Dessalines --- src/shared/components/post/create-post.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/components/post/create-post.tsx b/src/shared/components/post/create-post.tsx index 71fac79a..c7597917 100644 --- a/src/shared/components/post/create-post.tsx +++ b/src/shared/components/post/create-post.tsx @@ -224,6 +224,10 @@ export class CreatePost extends Component< if (res.state === "success") { const postId = res.data.post_view.post.id; this.props.history.replace(`/post/${postId}`); + } else { + this.setState({ + loading: false, + }); } }