feat: support flags in workspace

This commit is contained in:
himself65
2023-01-12 00:53:53 +08:00
parent cb7d16fe1f
commit 1d3dd8aa77
4 changed files with 61 additions and 34 deletions

View File

@@ -11,10 +11,10 @@
"dependencies": {
"@affine/datacenter": "workspace:*",
"@affine/i18n": "workspace:*",
"@blocksuite/blocks": "0.4.0-20230110112105-ef07332",
"@blocksuite/editor": "0.4.0-20230110112105-ef07332",
"@blocksuite/blocks": "0.4.0-20230111164952-fea266a",
"@blocksuite/editor": "0.4.0-20230111164952-fea266a",
"@blocksuite/icons": "^2.0.2",
"@blocksuite/store": "0.4.0-20230110112105-ef07332",
"@blocksuite/store": "0.4.0-20230111164952-fea266a",
"@emotion/css": "^11.10.0",
"@emotion/react": "^11.10.4",
"@emotion/server": "^11.10.0",

View File

@@ -26,8 +26,8 @@
"typescript": "^4.8.4"
},
"dependencies": {
"@blocksuite/blocks": "0.4.0-20230110112105-ef07332",
"@blocksuite/store": "0.4.0-20230110112105-ef07332",
"@blocksuite/blocks": "0.4.0-20230111164952-fea266a",
"@blocksuite/store": "0.4.0-20230111164952-fea266a",
"debug": "^4.3.4",
"encoding": "^0.1.13",
"firebase": "^9.15.0",

View File

@@ -102,7 +102,12 @@ export class DataCenter {
const providerId = await this._getProvider(id, params.providerId);
// init workspace & register block schema
const workspace = new Workspace({ room: id }).register(BlockSchema);
const workspace = new Workspace({
room: id,
defaultFlags: {
enable_drag_handle: false,
},
}).register(BlockSchema);
const Provider = this._providers.get(providerId);
assert(Provider);