mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 11:21:26 +00:00
Move lemmy.ml signup message to top of registration page (#554)
* Move lemmy.ml signup message to top of registration page * Fix warning css class, fix message padding
This commit is contained in:
parent
1d085dea12
commit
0da5fb9623
3 changed files with 15 additions and 11 deletions
|
@ -85,7 +85,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
|
|||
placeholder={i18n.t("comment_here")}
|
||||
/>
|
||||
) : (
|
||||
<div class="alert alert-light" role="alert">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<Icon icon="alert-triangle" classes="icon-inline mr-2" />
|
||||
<T i18nKey="must_login" class="d-inline">
|
||||
#
|
||||
|
|
|
@ -118,6 +118,7 @@ export class Signup extends Component<any, State> {
|
|||
}
|
||||
|
||||
get isLemmyMl(): boolean {
|
||||
return true;
|
||||
return isBrowser() && window.location.hostname == "lemmy.ml";
|
||||
}
|
||||
|
||||
|
@ -140,6 +141,16 @@ export class Signup extends Component<any, State> {
|
|||
<form onSubmit={linkEvent(this, this.handleRegisterSubmit)}>
|
||||
<h5>{this.titleName}</h5>
|
||||
|
||||
{this.isLemmyMl && (
|
||||
<div class="form-group row">
|
||||
<div class="mt-2 mb-0 alert alert-warning" role="alert">
|
||||
<T i18nKey="lemmy_ml_registration_message">
|
||||
#<a href={joinLemmyUrl}>#</a>
|
||||
</T>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label" htmlFor="register-username">
|
||||
{i18n.t("username")}
|
||||
|
@ -182,7 +193,7 @@ export class Signup extends Component<any, State> {
|
|||
/>
|
||||
{!this.state.site_view.site.require_email_verification &&
|
||||
!validEmail(this.state.registerForm.email) && (
|
||||
<div class="mt-2 mb-0 alert alert-light" role="alert">
|
||||
<div class="mt-2 mb-0 alert alert-warning" role="alert">
|
||||
<Icon icon="alert-triangle" classes="icon-inline mr-2" />
|
||||
{i18n.t("no_password_reset")}
|
||||
</div>
|
||||
|
@ -239,7 +250,7 @@ export class Signup extends Component<any, State> {
|
|||
<>
|
||||
<div class="form-group row">
|
||||
<div class="offset-sm-2 col-sm-10">
|
||||
<div class="mt-2 alert alert-light" role="alert">
|
||||
<div class="mt-2 alert alert-warning" role="alert">
|
||||
<Icon icon="alert-triangle" classes="icon-inline mr-2" />
|
||||
{i18n.t("fill_out_application")}
|
||||
</div>
|
||||
|
@ -316,13 +327,6 @@ export class Signup extends Component<any, State> {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
{this.isLemmyMl && (
|
||||
<div class="mt-2 mb-0 alert alert-light" role="alert">
|
||||
<T i18nKey="lemmy_ml_registration_message">
|
||||
#<a href={joinLemmyUrl}>#</a>
|
||||
</T>
|
||||
</div>
|
||||
)}
|
||||
<input
|
||||
tabIndex={-1}
|
||||
autoComplete="false"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { isBrowser } from "./utils";
|
||||
|
||||
const testHost = "localhost:8536";
|
||||
const testHost = "127.0.0.1:8536";
|
||||
|
||||
let internalHost =
|
||||
(!isBrowser() && process.env.LEMMY_INTERNAL_HOST) || testHost; // used for local dev
|
||||
|
|
Loading…
Reference in a new issue