mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
chore: proxy image preview in frontend (#11957)
<!-- 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 -->
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { defaultImageProxyMiddleware } from '@blocksuite/affine-block-image';
|
||||
import { defaultImageProxyMiddleware } from '@blocksuite/affine-shared/adapters';
|
||||
import {
|
||||
Schema,
|
||||
Transformer,
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
} from '@blocksuite/affine-model';
|
||||
import {
|
||||
HtmlAdapterFactoryExtension,
|
||||
ImageProxyService,
|
||||
MarkdownAdapterFactoryExtension,
|
||||
MixTextAdapterFactoryExtension,
|
||||
NotionHtmlAdapterFactoryExtension,
|
||||
@@ -83,9 +84,12 @@ const MigratingStoreExtensions: ExtensionType[] = [
|
||||
getAdapterFactoryExtensions(),
|
||||
|
||||
FeatureFlagService,
|
||||
BlockMetaService,
|
||||
|
||||
// TODO(@mirone): maybe merge these services into a file setting service
|
||||
LinkPreviewerService,
|
||||
FileSizeLimitService,
|
||||
BlockMetaService,
|
||||
ImageProxyService,
|
||||
].flat();
|
||||
|
||||
export class MigratingStoreExtension extends StoreExtensionProvider {
|
||||
|
||||
Reference in New Issue
Block a user