mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 19:16:29 +08:00
feat(core): sidebar template doc entrance (#9676)
close AF-2048, AF-2050, AF-2049
This commit is contained in:
@@ -102,6 +102,7 @@ export class DocsService extends Service {
|
||||
options: {
|
||||
primaryMode?: DocMode;
|
||||
docProps?: DocProps;
|
||||
isTemplate?: boolean;
|
||||
} = {}
|
||||
) {
|
||||
const doc = this.store.createBlockSuiteDoc();
|
||||
@@ -114,6 +115,9 @@ export class DocsService extends Service {
|
||||
if (options.primaryMode) {
|
||||
docRecord.setPrimaryMode(options.primaryMode);
|
||||
}
|
||||
if (options.isTemplate) {
|
||||
docRecord.setProperty('isTemplate', true);
|
||||
}
|
||||
this.eventBus.emit(DocCreated, docRecord);
|
||||
return docRecord;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user