From b49ca3efe33a9467a7f33c94f93130fcd021e41d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 24 Dec 2025 19:27:29 +0200 Subject: [PATCH] fix(print): disable for protected notes --- apps/client/src/widgets/ribbon/NoteActions.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/ribbon/NoteActions.tsx b/apps/client/src/widgets/ribbon/NoteActions.tsx index dfb0d93bb..05d7160d5 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?: Not const 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);