mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
feat: add preloading template (#2655)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
12
apps/web/src/utils/editor-flag.ts
Normal file
12
apps/web/src/utils/editor-flag.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { type BlockSuiteFeatureFlags, config } from '@affine/env';
|
||||
|
||||
import type { BlockSuiteWorkspace } from '../shared';
|
||||
|
||||
export function setEditorFlags(blockSuiteWorkspace: BlockSuiteWorkspace) {
|
||||
Object.entries(config.editorFlags).forEach(([key, value]) => {
|
||||
blockSuiteWorkspace.awarenessStore.setFlag(
|
||||
key as keyof BlockSuiteFeatureFlags,
|
||||
value
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user