- {{this.model.error}}
+
+ {{html-safe this.model.error}}
{{/if}}
{{#if this.model.can_login}}
- {{#if this.secondFactorRequired }}
- {{#if this.model.security_key_required }}
-
-
+
{{/if}}
diff --git a/app/assets/stylesheets/common/base/login.scss b/app/assets/stylesheets/common/base/login.scss
index 25bdbeac1e2..f56b7a5a3c5 100644
--- a/app/assets/stylesheets/common/base/login.scss
+++ b/app/assets/stylesheets/common/base/login.scss
@@ -453,3 +453,28 @@ button#new-account-link {
padding-bottom: 1em;
}
}
+
+.email-login {
+ border-radius: 10px;
+ background-color: var(--secondary);
+ padding: 20px;
+ margin: 0 auto;
+ .content-wrapper {
+ box-shadow: 0 1px 10px 1px rgba(var(--primary-low-rgb), 1.25);
+ border-radius: 10px;
+ padding: 1em 2.5em 1em 2.5em;
+ .image-wrapper {
+ text-align: center;
+ padding-bottom: 1em;
+ }
+ .email-login-form {
+ text-align: center;
+ .btn-primary {
+ margin-top: 10px;
+ }
+ #security-key {
+ justify-content: center;
+ }
+ }
+ }
+}
diff --git a/app/assets/stylesheets/desktop/login.scss b/app/assets/stylesheets/desktop/login.scss
index a8238ac7ad0..6db9f4e7ac2 100644
--- a/app/assets/stylesheets/desktop/login.scss
+++ b/app/assets/stylesheets/desktop/login.scss
@@ -394,7 +394,6 @@
}
.password-reset,
-.email-login,
.invites-show {
.col-form {
padding: 0.5em 2em 1em;
@@ -422,8 +421,7 @@
}
}
-.password-reset,
-.email-login {
+.password-reset {
.col-form {
padding-top: 40px;
}
@@ -476,3 +474,10 @@
}
}
}
+
+.email-login {
+ width: 550px;
+ .password-reset-img {
+ height: 150px;
+ }
+}
diff --git a/app/assets/stylesheets/mobile/login.scss b/app/assets/stylesheets/mobile/login.scss
index eccfa2c5624..18be40cd28f 100644
--- a/app/assets/stylesheets/mobile/login.scss
+++ b/app/assets/stylesheets/mobile/login.scss
@@ -269,3 +269,7 @@
font-size: var(--font-up-3);
}
}
+
+.email-login {
+ width: 90%;
+}
diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb
index 490f4db0ed7..ce1a97a616a 100644
--- a/app/controllers/session_controller.rb
+++ b/app/controllers/session_controller.rb
@@ -352,7 +352,7 @@ class SessionController < ApplicationController
else
render json: {
can_login: false,
- error: I18n.t('email_login.invalid_token')
+ error: I18n.t('email_login.invalid_token', base_url: Discourse.base_url)
}
end
end
@@ -383,7 +383,7 @@ class SessionController < ApplicationController
end
end
- render json: { error: I18n.t('email_login.invalid_token') }
+ render json: { error: I18n.t('email_login.invalid_token', base_url: Discourse.base_url) }
end
def one_time_password
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 71d42ab3d8b..fde2db3df23 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -841,7 +841,7 @@ en:
success_unapproved: "You successfully changed your password."
email_login:
- invalid_token: "Sorry, that email login link is too old. Select the Log In button and use 'I forgot my password' to get a new link."
+ invalid_token: 'Oops! The link you used no longer works. You can