chore: fix eslint in blocksuite (#9232)

This commit is contained in:
Saul-Mirone
2024-12-20 16:48:10 +00:00
parent bfcc53dc1f
commit 3a82da0e5b
269 changed files with 935 additions and 842 deletions
@@ -209,28 +209,30 @@ export function toolbarDefaultConfig(toolbar: AffineFormatBarWidget) {
const doc = host.doc;
const autofill = getTitleFromSelectedModels(selectedModels);
void promptDocTitle(host, autofill).then(async title => {
if (title === null) return;
await convertSelectedBlocksToLinkedDoc(
host.std,
doc,
draftedModels,
title
);
notifyDocCreated(host, doc);
host.std.getOptional(TelemetryProvider)?.track('DocCreated', {
control: 'create linked doc',
page: 'doc editor',
module: 'format toolbar',
type: 'embed-linked-doc',
});
host.std.getOptional(TelemetryProvider)?.track('LinkedDocCreated', {
control: 'create linked doc',
page: 'doc editor',
module: 'format toolbar',
type: 'embed-linked-doc',
});
});
promptDocTitle(host, autofill)
.then(async title => {
if (title === null) return;
await convertSelectedBlocksToLinkedDoc(
host.std,
doc,
draftedModels,
title
);
notifyDocCreated(host, doc);
host.std.getOptional(TelemetryProvider)?.track('DocCreated', {
control: 'create linked doc',
page: 'doc editor',
module: 'format toolbar',
type: 'embed-linked-doc',
});
host.std.getOptional(TelemetryProvider)?.track('LinkedDocCreated', {
control: 'create linked doc',
page: 'doc editor',
module: 'format toolbar',
type: 'embed-linked-doc',
});
})
.catch(console.error);
},
showWhen: chain => {
const [_, ctx] = chain