There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(core): only enable attachment preview for pdf (#10584)
pengx178e5d7858c48b
diff --git a/blocksuite/affine/block-attachment/src/attachment-block.ts b/blocksuite/affine/block-attachment/src/attachment-block.tsindex bdcb7b3579..20b0737ad8 100644--- a/blocksuite/affine/block-attachment/src/attachment-block.ts+++ b/blocksuite/affine/block-attachment/src/attachment-block.ts@@ -30,7 +30,11 @@ import { AttachmentEmbedProvider } from './embed.js';import { styles } from './styles.js';import { checkAttachmentBlob, downloadAttachmentBlob } from './utils.js';-@Peekable()+@Peekable({+ enableOn: ({ model }: AttachmentBlockComponent) => {+ return model.type.endsWith('pdf');+ },+})export class AttachmentBlockComponent extends CaptionedBlockComponent<AttachmentBlockModel> {static override styles = styles;