mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-27 06:33:32 +03:00
chore: add affine-cloud build config (#2971)
This commit is contained in:
parent
467eab4ddf
commit
262289a398
@ -23,6 +23,8 @@ const buildPreset = {
|
|||||||
enableTestProperties: false,
|
enableTestProperties: false,
|
||||||
enableBroadcastChannelProvider: true,
|
enableBroadcastChannelProvider: true,
|
||||||
enableDebugPage: true,
|
enableDebugPage: true,
|
||||||
|
// never set this to true in stable, because legacy cloud has deprecated
|
||||||
|
// and related code will be removed in the future
|
||||||
enableLegacyCloud: false,
|
enableLegacyCloud: false,
|
||||||
changelogUrl: 'https://affine.pro/blog/whats-new-affine-0630',
|
changelogUrl: 'https://affine.pro/blog/whats-new-affine-0630',
|
||||||
enablePreloading: true,
|
enablePreloading: true,
|
||||||
@ -30,6 +32,7 @@ const buildPreset = {
|
|||||||
enableNewSettingUnstableApi: false,
|
enableNewSettingUnstableApi: false,
|
||||||
enableSQLiteProvider: false,
|
enableSQLiteProvider: false,
|
||||||
enableNotificationCenter: false,
|
enableNotificationCenter: false,
|
||||||
|
enableCloud: false,
|
||||||
},
|
},
|
||||||
beta: {},
|
beta: {},
|
||||||
internal: {},
|
internal: {},
|
||||||
@ -46,6 +49,7 @@ const buildPreset = {
|
|||||||
enableNewSettingUnstableApi: false,
|
enableNewSettingUnstableApi: false,
|
||||||
enableSQLiteProvider: false,
|
enableSQLiteProvider: false,
|
||||||
enableNotificationCenter: true,
|
enableNotificationCenter: true,
|
||||||
|
enableCloud: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -56,7 +60,7 @@ buildPreset.internal = buildPreset.stable;
|
|||||||
const currentBuild = process.env.BUILD_TYPE || 'stable';
|
const currentBuild = process.env.BUILD_TYPE || 'stable';
|
||||||
|
|
||||||
if (process.env.CI && !process.env.BUILD_TYPE) {
|
if (process.env.CI && !process.env.BUILD_TYPE) {
|
||||||
throw new Error('BUILD_TYPE is required in CI');
|
throw new Error('BUILD_ENV is required in CI');
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentBuildPreset = buildPreset[currentBuild];
|
const currentBuildPreset = buildPreset[currentBuild];
|
||||||
@ -90,6 +94,9 @@ const environmentPreset = {
|
|||||||
enableNotificationCenter: process.env.ENABLE_NOTIFICATION_CENTER
|
enableNotificationCenter: process.env.ENABLE_NOTIFICATION_CENTER
|
||||||
? process.env.ENABLE_NOTIFICATION_CENTER === 'true'
|
? process.env.ENABLE_NOTIFICATION_CENTER === 'true'
|
||||||
: currentBuildPreset.enableNotificationCenter,
|
: currentBuildPreset.enableNotificationCenter,
|
||||||
|
enableCloud: process.env.ENABLE_CLOUD
|
||||||
|
? process.env.ENABLE_CLOUD === 'true'
|
||||||
|
: currentBuildPreset.enableCloud,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -89,23 +89,25 @@ export const SettingSidebar = ({
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={accountButton} onClick={onAccountSettingClick}>
|
{runtimeConfig.enableCloud && (
|
||||||
<UserAvatar
|
<div className={accountButton} onClick={onAccountSettingClick}>
|
||||||
size={28}
|
<UserAvatar
|
||||||
name="Account NameAccount Name"
|
size={28}
|
||||||
url={''}
|
name="Account NameAccount Name"
|
||||||
className="avatar"
|
url={''}
|
||||||
/>
|
className="avatar"
|
||||||
|
/>
|
||||||
|
|
||||||
<div className="content">
|
<div className="content">
|
||||||
<div className="name" title="xxx">
|
<div className="name" title="xxx">
|
||||||
Account NameAccount Name
|
Account NameAccount Name
|
||||||
</div>
|
</div>
|
||||||
<div className="email" title="xxx">
|
<div className="email" title="xxx">
|
||||||
xxxxxxxx@gmail.comxxxxxxxx@gmail.com
|
xxxxxxxx@gmail.comxxxxxxxx@gmail.com
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
1
packages/env/src/global.ts
vendored
1
packages/env/src/global.ts
vendored
@ -63,6 +63,7 @@ export const buildFlagsSchema = z.object({
|
|||||||
enableNewSettingUnstableApi: z.boolean(),
|
enableNewSettingUnstableApi: z.boolean(),
|
||||||
enableSQLiteProvider: z.boolean(),
|
enableSQLiteProvider: z.boolean(),
|
||||||
enableNotificationCenter: z.boolean(),
|
enableNotificationCenter: z.boolean(),
|
||||||
|
enableCloud: z.boolean(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const blockSuiteFeatureFlags = z.object({
|
export const blockSuiteFeatureFlags = z.object({
|
||||||
|
Loading…
Reference in New Issue
Block a user