fix: add is_cloud_only for templates (#37846)

Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
非法操作
2026-06-24 08:29:54 +00:00
committed by GitHub
co-authored by Joel
parent ce6297bed2
commit fe62177ba5
37 changed files with 447 additions and 67 deletions
@@ -18,6 +18,7 @@ const defaultCloudEnv = {
NEXT_PUBLIC_ENABLE_EMAIL_CODE_LOGIN: true,
NEXT_PUBLIC_ENABLE_EMAIL_PASSWORD_LOGIN: false,
NEXT_PUBLIC_ENABLE_EXPLORE_BANNER: true,
NEXT_PUBLIC_ENABLE_LEARN_APP: true,
NEXT_PUBLIC_ENABLE_MARKETPLACE: true,
NEXT_PUBLIC_ENABLE_SOCIAL_OAUTH_LOGIN: true,
NEXT_PUBLIC_ENABLE_TRIAL_APP: true,
@@ -140,6 +141,7 @@ describe('systemFeaturesQueryOptions', () => {
enable_email_password_login: false,
enable_social_oauth_login: true,
enable_trial_app: true,
enable_learn_app: true,
rbac_enabled: false,
})
})
@@ -153,6 +155,7 @@ describe('systemFeaturesQueryOptions', () => {
NEXT_PUBLIC_ENABLE_COLLABORATION_MODE: true,
NEXT_PUBLIC_ALLOW_REGISTER: false,
NEXT_PUBLIC_ENABLE_EXPLORE_BANNER: false,
NEXT_PUBLIC_ENABLE_LEARN_APP: true,
NEXT_PUBLIC_RBAC_ENABLED: true,
},
})
@@ -166,6 +169,7 @@ describe('systemFeaturesQueryOptions', () => {
enable_collaboration_mode: true,
is_allow_register: false,
enable_explore_banner: false,
enable_learn_app: true,
rbac_enabled: true,
branding: {
enabled: false,
@@ -219,6 +223,7 @@ describe('serverSystemFeaturesQueryOptions', () => {
cloudEnv: {
NEXT_PUBLIC_ENABLE_MARKETPLACE: false,
NEXT_PUBLIC_ENABLE_EMAIL_PASSWORD_LOGIN: true,
NEXT_PUBLIC_ENABLE_LEARN_APP: true,
},
})
@@ -231,6 +236,7 @@ describe('serverSystemFeaturesQueryOptions', () => {
expect(data).toMatchObject({
enable_marketplace: false,
enable_email_password_login: true,
enable_learn_app: true,
})
})
+2
View File
@@ -52,6 +52,7 @@ export const defaultSystemFeatures = {
enable_creators_platform: false,
enable_trial_app: false,
enable_explore_banner: false,
enable_learn_app: true,
} satisfies GetSystemFeaturesResponse
export const cloudSystemFeatures = {
@@ -101,5 +102,6 @@ export const cloudSystemFeatures = {
enable_creators_platform: env.NEXT_PUBLIC_CREATORS_PLATFORM_FEATURES_ENABLED,
enable_trial_app: env.NEXT_PUBLIC_ENABLE_TRIAL_APP,
enable_explore_banner: env.NEXT_PUBLIC_ENABLE_EXPLORE_BANNER,
enable_learn_app: env.NEXT_PUBLIC_ENABLE_LEARN_APP,
rbac_enabled: env.NEXT_PUBLIC_RBAC_ENABLED,
} satisfies GetSystemFeaturesResponse