diff --git a/app/assets/javascripts/discourse/app/controllers/login.js b/app/assets/javascripts/discourse/app/controllers/login.js index 5451447e80a..851c5f21ce9 100644 --- a/app/assets/javascripts/discourse/app/controllers/login.js +++ b/app/assets/javascripts/discourse/app/controllers/login.js @@ -35,6 +35,7 @@ export default class LoginPageController extends Controller { @tracked loggingIn = false; @tracked loggedIn = false; @tracked showLoginButtons = true; + @tracked showLogin = false; @tracked showSecondFactor = false; @tracked loginPassword = ""; @tracked loginName = ""; @@ -115,6 +116,11 @@ export default class LoginPageController extends Controller { return getURL("/u/admin-login"); } + @action + showLoginPage() { + this.showLogin = true; + } + @action async passkeyLogin(mediation = "optional") { try { diff --git a/app/assets/javascripts/discourse/app/routes/login.js b/app/assets/javascripts/discourse/app/routes/login.js index 080c89dd6d6..5a048edb946 100644 --- a/app/assets/javascripts/discourse/app/routes/login.js +++ b/app/assets/javascripts/discourse/app/routes/login.js @@ -21,9 +21,7 @@ export default class LoginRoute extends DiscourseRoute { } model() { - if (!this.siteSettings.experimental_full_page_login) { - return StaticPage.find("login"); - } + return StaticPage.find("login"); } setupController(controller) { diff --git a/app/assets/javascripts/discourse/app/templates/login.hbs b/app/assets/javascripts/discourse/app/templates/login.hbs index 9327ad23ddd..93e8638b382 100644 --- a/app/assets/javascripts/discourse/app/templates/login.hbs +++ b/app/assets/javascripts/discourse/app/templates/login.hbs @@ -1,4 +1,9 @@ -{{#if this.siteSettings.experimental_full_page_login}} +{{#if + (and + this.siteSettings.experimental_full_page_login + (or this.showLogin (not this.siteSettings.login_required)) + ) +}} {{hide-application-header-buttons "search" "login" "signup" "menu"}} {{hide-application-sidebar}} @@ -163,7 +168,11 @@ {{/if}}