refactor(editor): edgeless bookmark toolbar config extension (#10711)

This commit is contained in:
fundon
2025-03-19 02:24:26 +00:00
parent 70fe521300
commit d8567e669a
17 changed files with 537 additions and 101 deletions

View File

@@ -425,8 +425,6 @@ function createExternalLinkableToolbarConfig(
toast(ctx.host, 'Copied link to clipboard');
ctx.track('CopiedLink', {
segment: 'doc',
page: 'doc editor',
module: 'toolbar',
category: matchModels(model, [BookmarkBlockModel])
? 'bookmark'
@@ -464,8 +462,6 @@ function createExternalLinkableToolbarConfig(
);
ctx.track('OpenedAliasPopup', {
segment: 'doc',
page: 'doc editor',
module: 'toolbar',
category: matchModels(model, [BookmarkBlockModel])
? 'bookmark'
@@ -986,6 +982,11 @@ export const createCustomToolbarExtension = (
config: createExternalLinkableToolbarConfig(BookmarkBlockComponent),
}),
ToolbarModuleExtension({
id: BlockFlavourIdentifier('custom:affine:surface:bookmark'),
config: createExternalLinkableToolbarConfig(BookmarkBlockComponent),
}),
ToolbarModuleExtension({
id: BlockFlavourIdentifier('custom:affine:embed-figma'),
config: createExternalLinkableToolbarConfig(EmbedFigmaBlockComponent),