feat: add preloading template (#2655)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
Flrande
2023-06-07 17:31:54 +08:00
committed by GitHub
parent c4c4ec6a67
commit 35fb10c95b
67 changed files with 6761 additions and 287 deletions

View 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
);
});
}