DEV: Remove the `experimental_` prefix for fullpage login (#29546)
This commit is contained in:
parent
7333a00ddb
commit
93443adf22
|
@ -118,7 +118,7 @@ export default class LoginPageController extends Controller {
|
||||||
|
|
||||||
get shouldTriggerRouteAction() {
|
get shouldTriggerRouteAction() {
|
||||||
return (
|
return (
|
||||||
!this.siteSettings.experimental_full_page_login ||
|
!this.siteSettings.full_page_login ||
|
||||||
this.siteSettings.enable_discourse_connect
|
this.siteSettings.enable_discourse_connect
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default {
|
||||||
...properties,
|
...properties,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (siteSettings.experimental_full_page_login) {
|
if (siteSettings.full_page_login) {
|
||||||
router.transitionTo("login").then((login) => {
|
router.transitionTo("login").then((login) => {
|
||||||
Object.keys(loginProps || {}).forEach((key) => {
|
Object.keys(loginProps || {}).forEach((key) => {
|
||||||
login.controller.set(key, loginProps[key]);
|
login.controller.set(key, loginProps[key]);
|
||||||
|
@ -139,7 +139,7 @@ export default {
|
||||||
skipConfirmation: siteSettings.auth_skip_create_confirm,
|
skipConfirmation: siteSettings.auth_skip_create_confirm,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (siteSettings.experimental_full_page_login) {
|
if (siteSettings.full_page_login) {
|
||||||
router.transitionTo("signup").then((signup) => {
|
router.transitionTo("signup").then((signup) => {
|
||||||
const signupController =
|
const signupController =
|
||||||
signup.controller || owner.lookup("controller:signup");
|
signup.controller || owner.lookup("controller:signup");
|
||||||
|
|
|
@ -297,7 +297,7 @@ export default class ApplicationRoute extends DiscourseRoute {
|
||||||
} else {
|
} else {
|
||||||
if (this.isOnlyOneExternalLoginMethod) {
|
if (this.isOnlyOneExternalLoginMethod) {
|
||||||
this.login.externalLogin(this.externalLoginMethods[0]);
|
this.login.externalLogin(this.externalLoginMethods[0]);
|
||||||
} else if (this.siteSettings.experimental_full_page_login) {
|
} else if (this.siteSettings.full_page_login) {
|
||||||
this.router.transitionTo("login").then((login) => {
|
this.router.transitionTo("login").then((login) => {
|
||||||
login.controller.set("canSignUp", this.controller.canSignUp);
|
login.controller.set("canSignUp", this.controller.canSignUp);
|
||||||
if (this.siteSettings.login_required) {
|
if (this.siteSettings.login_required) {
|
||||||
|
@ -326,7 +326,7 @@ export default class ApplicationRoute extends DiscourseRoute {
|
||||||
this.login.externalLogin(this.externalLoginMethods[0], {
|
this.login.externalLogin(this.externalLoginMethods[0], {
|
||||||
signup: true,
|
signup: true,
|
||||||
});
|
});
|
||||||
} else if (this.siteSettings.experimental_full_page_login) {
|
} else if (this.siteSettings.full_page_login) {
|
||||||
this.router.transitionTo("signup").then((signup) => {
|
this.router.transitionTo("signup").then((signup) => {
|
||||||
Object.keys(createAccountProps || {}).forEach((key) => {
|
Object.keys(createAccountProps || {}).forEach((key) => {
|
||||||
signup.controller.set(key, createAccountProps[key]);
|
signup.controller.set(key, createAccountProps[key]);
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default class LoginRoute extends DiscourseRoute {
|
||||||
beforeModel() {
|
beforeModel() {
|
||||||
if (
|
if (
|
||||||
!this.siteSettings.login_required &&
|
!this.siteSettings.login_required &&
|
||||||
(!this.siteSettings.experimental_full_page_login ||
|
(!this.siteSettings.full_page_login ||
|
||||||
this.siteSettings.enable_discourse_connect)
|
this.siteSettings.enable_discourse_connect)
|
||||||
) {
|
) {
|
||||||
this.router
|
this.router
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default class SignupRoute extends DiscourseRoute {
|
||||||
@action
|
@action
|
||||||
async showCreateAccount() {
|
async showCreateAccount() {
|
||||||
const { canSignUp } = this.controllerFor("application");
|
const { canSignUp } = this.controllerFor("application");
|
||||||
if (canSignUp && this.siteSettings.experimental_full_page_login) {
|
if (canSignUp && this.siteSettings.full_page_login) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const route = await this.router
|
const route = await this.router
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{#if
|
{{#if
|
||||||
(and
|
(and
|
||||||
this.siteSettings.experimental_full_page_login
|
this.siteSettings.full_page_login
|
||||||
(or this.showLogin (not this.siteSettings.login_required))
|
(or this.showLogin (not this.siteSettings.login_required))
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1884,7 +1884,7 @@ en:
|
||||||
pending_users_reminder_delay_minutes: "Notify moderators if new users have been waiting for approval for longer than this many minutes. Set to -1 to disable notifications."
|
pending_users_reminder_delay_minutes: "Notify moderators if new users have been waiting for approval for longer than this many minutes. Set to -1 to disable notifications."
|
||||||
persistent_sessions: "Users will remain logged in when the web browser is closed"
|
persistent_sessions: "Users will remain logged in when the web browser is closed"
|
||||||
maximum_session_age: "User will remain logged in for n hours since last visit"
|
maximum_session_age: "User will remain logged in for n hours since last visit"
|
||||||
experimental_full_page_login: "Replace the login/signup modal with a full page login/signup form."
|
full_page_login: "Show the login and signup forms in a full page (when unchecked, users will see the forms in a modal). "
|
||||||
ga_version: "Version of Google Universal Analytics to use: v3 (analytics.js), v4 (gtag)"
|
ga_version: "Version of Google Universal Analytics to use: v3 (analytics.js), v4 (gtag)"
|
||||||
ga_universal_tracking_code: "Google Universal Analytics tracking code ID, eg: UA-12345678-9; see <a href='https://google.com/analytics' target='_blank'>https://google.com/analytics</a>"
|
ga_universal_tracking_code: "Google Universal Analytics tracking code ID, eg: UA-12345678-9; see <a href='https://google.com/analytics' target='_blank'>https://google.com/analytics</a>"
|
||||||
ga_universal_domain_name: "Google Universal Analytics domain name, eg: mysite.com; see <a href='https://google.com/analytics' target='_blank'>https://google.com/analytics</a>"
|
ga_universal_domain_name: "Google Universal Analytics domain name, eg: mysite.com; see <a href='https://google.com/analytics' target='_blank'>https://google.com/analytics</a>"
|
||||||
|
|
|
@ -628,6 +628,9 @@ login:
|
||||||
default: 1440
|
default: 1440
|
||||||
min: 1
|
min: 1
|
||||||
max: 175200
|
max: 175200
|
||||||
|
full_page_login:
|
||||||
|
default: false
|
||||||
|
client: true
|
||||||
|
|
||||||
users:
|
users:
|
||||||
min_username_length:
|
min_username_length:
|
||||||
|
@ -3295,9 +3298,6 @@ dashboard:
|
||||||
client: true
|
client: true
|
||||||
|
|
||||||
experimental:
|
experimental:
|
||||||
experimental_full_page_login:
|
|
||||||
default: false
|
|
||||||
client: true
|
|
||||||
experimental_rename_faq_to_guidelines:
|
experimental_rename_faq_to_guidelines:
|
||||||
default: false
|
default: false
|
||||||
hidden: true
|
hidden: true
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class RenameFullPageSiteSetting < ActiveRecord::Migration[7.1]
|
||||||
|
def up
|
||||||
|
execute "UPDATE site_settings SET name = 'full_page_login' where name = 'experimental_full_page_login'"
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
execute "UPDATE site_settings SET name = 'experimental_full_page_login' where name = 'full_page_login'"
|
||||||
|
end
|
||||||
|
end
|
|
@ -252,12 +252,12 @@ describe "Login", type: :system do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when fullpage desktop" do
|
context "when fullpage desktop" do
|
||||||
before { SiteSetting.experimental_full_page_login = true }
|
before { SiteSetting.full_page_login = true }
|
||||||
include_examples "login scenarios", PageObjects::Pages::Login.new
|
include_examples "login scenarios", PageObjects::Pages::Login.new
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when fullpage mobile", mobile: true do
|
context "when fullpage mobile", mobile: true do
|
||||||
before { SiteSetting.experimental_full_page_login = true }
|
before { SiteSetting.full_page_login = true }
|
||||||
include_examples "login scenarios", PageObjects::Pages::Login.new
|
include_examples "login scenarios", PageObjects::Pages::Login.new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -295,14 +295,14 @@ describe "Signup", type: :system do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when fullpage desktop" do
|
context "when fullpage desktop" do
|
||||||
before { SiteSetting.experimental_full_page_login = true }
|
before { SiteSetting.full_page_login = true }
|
||||||
include_examples "signup scenarios",
|
include_examples "signup scenarios",
|
||||||
PageObjects::Pages::Signup.new,
|
PageObjects::Pages::Signup.new,
|
||||||
PageObjects::Pages::Login.new
|
PageObjects::Pages::Login.new
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when fullpage mobile", mobile: true do
|
context "when fullpage mobile", mobile: true do
|
||||||
before { SiteSetting.experimental_full_page_login = true }
|
before { SiteSetting.full_page_login = true }
|
||||||
include_examples "signup scenarios",
|
include_examples "signup scenarios",
|
||||||
PageObjects::Pages::Signup.new,
|
PageObjects::Pages::Signup.new,
|
||||||
PageObjects::Pages::Login.new
|
PageObjects::Pages::Login.new
|
||||||
|
|
|
@ -348,14 +348,14 @@ describe "Social authentication", type: :system do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when fullpage desktop" do
|
context "when fullpage desktop" do
|
||||||
before { SiteSetting.experimental_full_page_login = true }
|
before { SiteSetting.full_page_login = true }
|
||||||
include_examples "social authentication scenarios",
|
include_examples "social authentication scenarios",
|
||||||
PageObjects::Pages::Signup.new,
|
PageObjects::Pages::Signup.new,
|
||||||
PageObjects::Pages::Login.new
|
PageObjects::Pages::Login.new
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when fullpage mobile", mobile: true do
|
context "when fullpage mobile", mobile: true do
|
||||||
before { SiteSetting.experimental_full_page_login = true }
|
before { SiteSetting.full_page_login = true }
|
||||||
include_examples "social authentication scenarios",
|
include_examples "social authentication scenarios",
|
||||||
PageObjects::Pages::Signup.new,
|
PageObjects::Pages::Signup.new,
|
||||||
PageObjects::Pages::Login.new
|
PageObjects::Pages::Login.new
|
||||||
|
|
Loading…
Reference in New Issue