mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
chore: remove multiple cloud server flag (#12531)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
ServersService,
|
||||
} from '@affine/core/modules/cloud';
|
||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||
import {
|
||||
type WorkspaceMetadata,
|
||||
@@ -262,18 +261,15 @@ const CloudWorkSpaceList = ({
|
||||
|
||||
const AddServer = () => {
|
||||
const globalDialogService = useService(GlobalDialogService);
|
||||
const featureFlagService = useService(FeatureFlagService);
|
||||
const enableMultipleServer = useLiveData(
|
||||
featureFlagService.flags.enable_multiple_cloud_servers.$
|
||||
);
|
||||
|
||||
const onAddServer = useCallback(() => {
|
||||
globalDialogService.open('sign-in', { step: 'addSelfhosted' });
|
||||
}, [globalDialogService]);
|
||||
|
||||
if (!enableMultipleServer) {
|
||||
if (!BUILD_CONFIG.isNative) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <IconButton onClick={onAddServer} size="24" icon={<SelfhostIcon />} />;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user