mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 13:51:13 +00:00
UX - Swap "Select Language" and "Cancel/Preview/Reply" button locations around in commentsReverse order of buttons in Reply TextArea (#2730)
* Reverse order of buttons in Reply TextArea Fixes #1924 * Update markdown-textarea.tsx Oopsie * I'm so confused Reverse last commit * Update markdown-textarea.tsx ?? * Update markdown-textarea.tsx * Lint markdown-textarea.tsx
This commit is contained in:
parent
62e482e84c
commit
7fafd34de8
1 changed files with 25 additions and 25 deletions
|
@ -257,29 +257,14 @@ export class MarkdownTextArea extends Component<
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="col-12 d-flex align-items-center flex-wrap mt-2">
|
<div className="col-12 d-flex align-items-center flex-wrap mt-2">
|
||||||
{this.props.showLanguage && (
|
{this.props.buttonTitle && (
|
||||||
<LanguageSelect
|
|
||||||
iconVersion
|
|
||||||
allLanguages={this.props.allLanguages}
|
|
||||||
selectedLanguageIds={
|
|
||||||
languageId ? Array.of(languageId) : undefined
|
|
||||||
}
|
|
||||||
siteLanguages={this.props.siteLanguages}
|
|
||||||
onChange={this.handleLanguageChange}
|
|
||||||
disabled={this.isDisabled}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* A flex expander */}
|
|
||||||
<div className="flex-grow-1"></div>
|
|
||||||
|
|
||||||
{this.props.replyType && (
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="submit"
|
||||||
className="btn btn-sm btn-secondary ms-2"
|
className="btn btn-sm btn-secondary ms-2"
|
||||||
onClick={linkEvent(this, this.handleReplyCancel)}
|
disabled={this.isDisabled || !this.state.content}
|
||||||
>
|
>
|
||||||
{I18NextService.i18n.t("cancel")}
|
{this.state.loading && <Spinner className="me-1" />}
|
||||||
|
{this.props.buttonTitle}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
|
@ -294,16 +279,31 @@ export class MarkdownTextArea extends Component<
|
||||||
? I18NextService.i18n.t("edit")
|
? I18NextService.i18n.t("edit")
|
||||||
: I18NextService.i18n.t("preview")}
|
: I18NextService.i18n.t("preview")}
|
||||||
</button>
|
</button>
|
||||||
{this.props.buttonTitle && (
|
{this.props.replyType && (
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="button"
|
||||||
className="btn btn-sm btn-secondary ms-2"
|
className="btn btn-sm btn-secondary ms-2"
|
||||||
disabled={this.isDisabled || !this.state.content}
|
onClick={linkEvent(this, this.handleReplyCancel)}
|
||||||
>
|
>
|
||||||
{this.state.loading && <Spinner className="me-1" />}
|
{I18NextService.i18n.t("cancel")}
|
||||||
{this.props.buttonTitle}
|
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* A flex expander */}
|
||||||
|
<div className="flex-grow-1"></div>
|
||||||
|
|
||||||
|
{this.props.showLanguage && (
|
||||||
|
<LanguageSelect
|
||||||
|
iconVersion
|
||||||
|
allLanguages={this.props.allLanguages}
|
||||||
|
selectedLanguageIds={
|
||||||
|
languageId ? Array.of(languageId) : undefined
|
||||||
|
}
|
||||||
|
siteLanguages={this.props.siteLanguages}
|
||||||
|
onChange={this.handleLanguageChange}
|
||||||
|
disabled={this.isDisabled}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue