mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 10:52:45 +08:00
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() {
|
||||
return (
|
||||
!this.siteSettings.experimental_full_page_login ||
|
||||
!this.siteSettings.full_page_login ||
|
||||
this.siteSettings.enable_discourse_connect
|
||||
);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ export default {
|
|||
...properties,
|
||||
};
|
||||
|
||||
if (siteSettings.experimental_full_page_login) {
|
||||
if (siteSettings.full_page_login) {
|
||||
router.transitionTo("login").then((login) => {
|
||||
Object.keys(loginProps || {}).forEach((key) => {
|
||||
login.controller.set(key, loginProps[key]);
|
||||
|
@ -139,7 +139,7 @@ export default {
|
|||
skipConfirmation: siteSettings.auth_skip_create_confirm,
|
||||
};
|
||||
|
||||
if (siteSettings.experimental_full_page_login) {
|
||||
if (siteSettings.full_page_login) {
|
||||
router.transitionTo("signup").then((signup) => {
|
||||
const signupController =
|
||||
signup.controller || owner.lookup("controller:signup");
|
||||
|
|
|
@ -297,7 +297,7 @@ export default class ApplicationRoute extends DiscourseRoute {
|
|||
} else {
|
||||
if (this.isOnlyOneExternalLoginMethod) {
|
||||
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) => {
|
||||
login.controller.set("canSignUp", this.controller.canSignUp);
|
||||
if (this.siteSettings.login_required) {
|
||||
|
@ -326,7 +326,7 @@ export default class ApplicationRoute extends DiscourseRoute {
|
|||
this.login.externalLogin(this.externalLoginMethods[0], {
|
||||
signup: true,
|
||||
});
|
||||
} else if (this.siteSettings.experimental_full_page_login) {
|
||||
} else if (this.siteSettings.full_page_login) {
|
||||
this.router.transitionTo("signup").then((signup) => {
|
||||
Object.keys(createAccountProps || {}).forEach((key) => {
|
||||
signup.controller.set(key, createAccountProps[key]);
|
||||
|
|
|
@ -11,7 +11,7 @@ export default class LoginRoute extends DiscourseRoute {
|
|||
beforeModel() {
|
||||
if (
|
||||
!this.siteSettings.login_required &&
|
||||
(!this.siteSettings.experimental_full_page_login ||
|
||||
(!this.siteSettings.full_page_login ||
|
||||
this.siteSettings.enable_discourse_connect)
|
||||
) {
|
||||
this.router
|
||||
|
|
|
@ -14,7 +14,7 @@ export default class SignupRoute extends DiscourseRoute {
|
|||
@action
|
||||
async showCreateAccount() {
|
||||
const { canSignUp } = this.controllerFor("application");
|
||||
if (canSignUp && this.siteSettings.experimental_full_page_login) {
|
||||
if (canSignUp && this.siteSettings.full_page_login) {
|
||||
return;
|
||||
}
|
||||
const route = await this.router
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{#if
|
||||
(and
|
||||
this.siteSettings.experimental_full_page_login
|
||||
this.siteSettings.full_page_login
|
||||
(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."
|
||||
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"
|
||||
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_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>"
|
||||
|
|
|
@ -628,6 +628,9 @@ login:
|
|||
default: 1440
|
||||
min: 1
|
||||
max: 175200
|
||||
full_page_login:
|
||||
default: false
|
||||
client: true
|
||||
|
||||
users:
|
||||
min_username_length:
|
||||
|
@ -3295,9 +3298,6 @@ dashboard:
|
|||
client: true
|
||||
|
||||
experimental:
|
||||
experimental_full_page_login:
|
||||
default: false
|
||||
client: true
|
||||
experimental_rename_faq_to_guidelines:
|
||||
default: false
|
||||
hidden: true
|
||||
|
|
11
db/migrate/20241104132424_rename_full_page_site_setting.rb
Normal file
11
db/migrate/20241104132424_rename_full_page_site_setting.rb
Normal file
|
@ -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
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
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
|
||||
end
|
||||
end
|
||||
|
|
|
@ -295,14 +295,14 @@ describe "Signup", type: :system do
|
|||
end
|
||||
|
||||
context "when fullpage desktop" do
|
||||
before { SiteSetting.experimental_full_page_login = true }
|
||||
before { SiteSetting.full_page_login = true }
|
||||
include_examples "signup scenarios",
|
||||
PageObjects::Pages::Signup.new,
|
||||
PageObjects::Pages::Login.new
|
||||
end
|
||||
|
||||
context "when fullpage mobile", mobile: true do
|
||||
before { SiteSetting.experimental_full_page_login = true }
|
||||
before { SiteSetting.full_page_login = true }
|
||||
include_examples "signup scenarios",
|
||||
PageObjects::Pages::Signup.new,
|
||||
PageObjects::Pages::Login.new
|
||||
|
|
|
@ -348,14 +348,14 @@ describe "Social authentication", type: :system do
|
|||
end
|
||||
|
||||
context "when fullpage desktop" do
|
||||
before { SiteSetting.experimental_full_page_login = true }
|
||||
before { SiteSetting.full_page_login = true }
|
||||
include_examples "social authentication scenarios",
|
||||
PageObjects::Pages::Signup.new,
|
||||
PageObjects::Pages::Login.new
|
||||
end
|
||||
|
||||
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",
|
||||
PageObjects::Pages::Signup.new,
|
||||
PageObjects::Pages::Login.new
|
||||
|
|
Loading…
Reference in New Issue
Block a user