fix(core): only enable attachment preview for pdf (#10584)

This commit is contained in:
pengx17
2025-03-03 11:07:13 +00:00
parent 37fbfbcf3e
commit 8e5d7858c4
@@ -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;