Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(pdf): add read-only badge
Elian Dorand363a4870bd8
diff --git a/apps/client/src/components/note_context.ts b/apps/client/src/components/note_context.tsindex c897db0cee..3f7d90e34d 100644--- a/apps/client/src/components/note_context.ts+++ b/apps/client/src/components/note_context.ts@@ -321,7 +321,8 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">}// Note types that support a read-only state (via the #readOnly label, source view, or auto-readonly).- if (!READ_ONLY_CAPABLE_TYPES.includes(this.note.type)) {+ const isPdf = this.note.type === "file" && this.note.mime === "application/pdf";+ if (!isPdf && !READ_ONLY_CAPABLE_TYPES.includes(this.note.type)) {return false;}