From c2ffcb2c2c05d8d4232b17aadf9c8fee7e46b120 Mon Sep 17 00:00:00 2001 From: forehalo Date: Mon, 26 May 2025 12:37:14 +0000 Subject: [PATCH] chore: remove multiple cloud server flag (#12531) ## Summary by CodeRabbit - **New Features** - The "Add Selfhosted" and "Add Server" options are now displayed whenever the build configuration is native, without relying on feature flags. - **Refactor** - Simplified conditional rendering for server addition buttons by replacing feature flag checks with build configuration checks. - **Chores** - Removed the "Multiple Cloud Servers" feature flag and its related localization strings, streamlining feature management and UI labels. --- .../frontend/core/src/components/sign-in/sign-in.tsx | 7 +------ .../user-with-workspace-list/add-server/index.tsx | 10 +++------- .../src/mobile/components/workspace-selector/menu.tsx | 8 ++------ .../frontend/core/src/modules/feature-flag/constant.ts | 9 --------- packages/frontend/i18n/src/i18n.gen.ts | 8 -------- packages/frontend/i18n/src/resources/en.json | 2 -- 6 files changed, 6 insertions(+), 38 deletions(-) diff --git a/packages/frontend/core/src/components/sign-in/sign-in.tsx b/packages/frontend/core/src/components/sign-in/sign-in.tsx index 250d7fc12f..09126c08c5 100644 --- a/packages/frontend/core/src/components/sign-in/sign-in.tsx +++ b/packages/frontend/core/src/components/sign-in/sign-in.tsx @@ -10,7 +10,6 @@ import { OAuth } from '@affine/core/components/affine/auth/oauth'; import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks'; import { AuthService, ServerService } from '@affine/core/modules/cloud'; import type { AuthSessionStatus } from '@affine/core/modules/cloud/entities/session'; -import { FeatureFlagService } from '@affine/core/modules/feature-flag'; import { ServerDeploymentType } from '@affine/graphql'; import { Trans, useI18n } from '@affine/i18n'; import { @@ -61,10 +60,6 @@ export const SignInStep = ({ ) ); const authService = useService(AuthService); - const featureFlagService = useService(FeatureFlagService); - const enableMultipleCloudServers = useLiveData( - featureFlagService.flags.enable_multiple_cloud_servers.$ - ); const [isMutating, setIsMutating] = useState(false); const [email, setEmail] = useState(''); @@ -181,7 +176,7 @@ export const SignInStep = ({
- {BUILD_CONFIG.isElectron && enableMultipleCloudServers ? ( + {BUILD_CONFIG.isNative ? (