From: Jay Sitter Date: Sat, 24 Jun 2023 03:13:09 +0000 (-0400) Subject: feat: Clean up the Create Private Message page a bit X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/hacktivis.me/%22?a=commitdiff_plain;h=b231fd1e5baa7325c08c31039751b6b742076f6a;p=lemmy-ui.git feat: Clean up the Create Private Message page a bit --- diff --git a/src/shared/components/common/icon.tsx b/src/shared/components/common/icon.tsx index 7aedee7..5b6ddf8 100644 --- a/src/shared/components/common/icon.tsx +++ b/src/shared/components/common/icon.tsx @@ -35,6 +35,7 @@ export class Icon extends Component { interface SpinnerProps { large?: boolean; + className?: string; } export class Spinner extends Component { @@ -46,7 +47,9 @@ export class Spinner extends Component { return ( ); } diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index 97d1d14..73946ea 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -272,19 +272,6 @@ export class MarkdownTextArea extends Component< {/* A flex expander */}
- {this.props.buttonTitle && ( - - )} {this.props.replyType && ( + {this.props.buttonTitle && ( )} diff --git a/src/shared/components/private_message/create-private-message.tsx b/src/shared/components/private_message/create-private-message.tsx index 8afd348..840a442 100644 --- a/src/shared/components/private_message/create-private-message.tsx +++ b/src/shared/components/private_message/create-private-message.tsx @@ -115,7 +115,9 @@ export class CreatePrivateMessage extends Component< return (
-
{I18NextService.i18n.t("create_private_message")}
+

+ {I18NextService.i18n.t("create_private_message")} +

+
{!this.props.privateMessageView && ( -
+
-
+
)} +
+ + + # + + # + + +
{ + this.handlePrivateMessageSubmit(this, event); + }} initialContent={this.state.content} onContentChange={this.handleContentChange} allLanguages={[]} siteLanguages={[]} hideNavigationWarnings + buttonTitle={ + this.props.privateMessageView + ? capitalizeFirstLetter(I18NextService.i18n.t("save")) + : capitalizeFirstLetter(I18NextService.i18n.t("send_message")) + } />
- {this.state.showDisclaimer && ( -
-
-
- - # - - # - - -
-
-
- )} -
-
+
+ {this.props.privateMessageView && ( - {this.props.privateMessageView && ( - - )} -
    -
  • -
-
+ )}
); @@ -200,8 +170,4 @@ export class PrivateMessageForm extends Component< event.preventDefault(); i.setState({ previewMode: !i.state.previewMode }); } - - handleShowDisclaimer(i: PrivateMessageForm) { - i.setState({ showDisclaimer: !i.state.showDisclaimer }); - } }