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
fix(print): disable for protected notes
Elian Doranb49ca3efe33a
diff --git a/apps/client/src/widgets/ribbon/NoteActions.tsx b/apps/client/src/widgets/ribbon/NoteActions.tsxindex dfb0d93bbb..05d7160d5c 100644--- a/apps/client/src/widgets/ribbon/NoteActions.tsx+++ b/apps/client/src/widgets/ribbon/NoteActions.tsx@@ -71,9 +71,12 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Notconst canBeConvertedToAttachment = note?.isEligibleForConversionToAttachment();const isSearchable = ["text", "code", "book", "mindMap", "doc"].includes(noteType);const isInOptionsOrHelp = note?.noteId.startsWith("_options") || note?.noteId.startsWith("_help");- const isPrintable = ["text", "code"].includes(noteType) || (noteType === "book" && ["presentation", "list", "table"].includes(viewType ?? ""));const isExportableToImage = ["mermaid", "mindMap"].includes(noteType);const isContentAvailable = note.isContentAvailable();+ const isPrintable = isContentAvailable && (+ ["text", "code"].includes(noteType) ||+ (noteType === "book" && ["presentation", "list", "table"].includes(viewType ?? ""))+ );const isElectron = getIsElectron();const isMac = getIsMac();const hasSource = ["text", "code", "relationMap", "mermaid", "canvas", "mindMap", "aiChat"].includes(noteType);