]> Untitled Git - lemmy-ui.git/commitdiff
Always show password reset link. Fixes #176
authorDessalines <tyhou13@gmx.com>
Thu, 11 Feb 2021 18:52:26 +0000 (13:52 -0500)
committerDessalines <tyhou13@gmx.com>
Thu, 11 Feb 2021 18:52:26 +0000 (13:52 -0500)
src/assets/css/main.css
src/shared/components/login.tsx

index 115ad2b8deedc37ea1dd4b004a7c146de6e2ac45..349d81cec5098f2088f4dc7b280fb29c514256ed 100644 (file)
   cursor: pointer;
 }
 
+.pointer-events {
+  pointer-events: auto !important;
+}
+
 .no-click {
   pointer-events:none;
   opacity: 0.65;
index 7006ae71b0b656f5e6c511ae41760d1e130647fe..f772f04a3bc9671fec51efe9a31e7b8290fe66f0 100644 (file)
@@ -134,15 +134,15 @@ export class Login extends Component<any, State> {
                 class="form-control"
                 required
               />
-              {validEmail(this.state.loginForm.username_or_email) && (
-                <button
-                  type="button"
-                  onClick={linkEvent(this, this.handlePasswordReset)}
-                  className="btn p-0 btn-link d-inline-block float-right text-muted small font-weight-bold"
-                >
-                  {i18n.t('forgot_password')}
-                </button>
-              )}
+              <button
+                type="button"
+                onClick={linkEvent(this, this.handlePasswordReset)}
+                className="btn p-0 btn-link d-inline-block float-right text-muted small font-weight-bold pointer-events"
+                disabled={!validEmail(this.state.loginForm.username_or_email)}
+                title={i18n.t('no_password_reset')}
+              >
+                {i18n.t('forgot_password')}
+              </button>
             </div>
           </div>
           <div class="form-group row">