]> Untitled Git - lemmy-ui.git/commitdiff
Move lemmy.ml signup message to top of registration page (#554)
authorNutomic <me@nutomic.com>
Thu, 27 Jan 2022 18:44:08 +0000 (18:44 +0000)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 18:44:08 +0000 (13:44 -0500)
* Move lemmy.ml signup message to top of registration page

* Fix warning css class, fix message padding

src/shared/components/comment/comment-form.tsx
src/shared/components/home/signup.tsx
src/shared/env.ts

index 515e3d990a1e0c73663f7be9d2798e5a2d2f6a41..58cabeb60623efc7a0ce0b62036f3536fbccef0f 100644 (file)
@@ -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">
               #
index 8effa9586ff9909f7453d8268488571df3dcc24c..3dca46767aad7fecca10f9c1b02397233e1c09ad 100644 (file)
@@ -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"
index 43b9ce0da50b9e2f61f1963275e75c7980bfde2e..3b93882a826cc4e3e4c4a3b67bd152a685ad9850 100644 (file)
@@ -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