mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 20:18:42 +08:00
@@ -0,0 +1,25 @@
|
||||
import {
|
||||
type ViewExtensionContext,
|
||||
ViewExtensionProvider,
|
||||
} from '@blocksuite/affine-ext-loader';
|
||||
|
||||
import { effects } from './effects';
|
||||
import { TemplateTool } from './template-tool';
|
||||
import { templateSeniorTool } from './toolbar/senior-tool';
|
||||
|
||||
export class TemplateViewExtension extends ViewExtensionProvider {
|
||||
override name = 'affine-template-view';
|
||||
|
||||
override effect(): void {
|
||||
super.effect();
|
||||
effects();
|
||||
}
|
||||
|
||||
override setup(context: ViewExtensionContext) {
|
||||
super.setup(context);
|
||||
if (this.isEdgeless(context.scope)) {
|
||||
context.register(TemplateTool);
|
||||
context.register(templateSeniorTool);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user