mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
refactor: workspace manager (#5060)
This commit is contained in:
10
packages/common/env/src/global.ts
vendored
10
packages/common/env/src/global.ts
vendored
@@ -1,5 +1,6 @@
|
||||
/// <reference types="@blocksuite/global" />
|
||||
import { assertEquals } from '@blocksuite/global/utils';
|
||||
import type { Workspace } from '@blocksuite/store';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { isDesktop, isServer } from './constant.js';
|
||||
@@ -149,3 +150,12 @@ export function setupGlobal() {
|
||||
|
||||
globalThis.$AFFINE_SETUP = true;
|
||||
}
|
||||
|
||||
export function setupEditorFlags(workspace: Workspace) {
|
||||
Object.entries(runtimeConfig.editorFlags).forEach(([key, value]) => {
|
||||
workspace.awarenessStore.setFlag(
|
||||
key as keyof BlockSuiteFeatureFlags,
|
||||
value
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user