mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 18:41:52 +08:00
fix: allow PDF preview on readonly public pages (#14761)
fixes https://github.com/toeverything/AFFiNE/issues/14727 https://www.loom.com/share/dfcd558332404896b3e02aad97b18f02 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * PDF attachments can now be previewed in read-only documents. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -54,7 +54,7 @@ type AttachmentResolvedStateInfo = ResolvedStateInfo & {
|
|||||||
|
|
||||||
@Peekable({
|
@Peekable({
|
||||||
enableOn: ({ model }: AttachmentBlockComponent) => {
|
enableOn: ({ model }: AttachmentBlockComponent) => {
|
||||||
return !model.store.readonly && model.props.type.endsWith('pdf');
|
return model.props.type.endsWith('pdf');
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
export class AttachmentBlockComponent extends CaptionedBlockComponent<AttachmentBlockModel> {
|
export class AttachmentBlockComponent extends CaptionedBlockComponent<AttachmentBlockModel> {
|
||||||
|
|||||||
Reference in New Issue
Block a user