mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 11:36:25 +08:00
4ffa37d1c3
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Images and icons in bookmark cards are now loaded through an image proxy for improved reliability and consistency. - Embed blocks for GitHub, Loom, and YouTube now display banner and creator images via an image proxy service for enhanced image loading. - **Refactor** - Simplified backend URL handling and proxy logic for images, resulting in more efficient processing and reduced complexity. - Consolidated image proxy middleware and services into a shared adapter module for streamlined imports and improved maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
19 lines
641 B
TypeScript
19 lines
641 B
TypeScript
import {
|
|
type StoreExtensionContext,
|
|
StoreExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
import { ImageBlockSchemaExtension } from '@blocksuite/affine-model';
|
|
import { ImageSelectionExtension } from '@blocksuite/affine-shared/selection';
|
|
|
|
import { ImageBlockAdapterExtensions } from './adapters/extension';
|
|
|
|
export class ImageStoreExtension extends StoreExtensionProvider {
|
|
override name = 'affine-image-block';
|
|
|
|
override setup(context: StoreExtensionContext) {
|
|
super.setup(context);
|
|
context.register([ImageBlockSchemaExtension, ImageSelectionExtension]);
|
|
context.register(ImageBlockAdapterExtensions);
|
|
}
|
|
}
|