fix(print): disable for protected notes

This commit is contained in:
Elian Doran 2025-12-24 19:27:29 +02:00
parent d21127e3a7
commit b49ca3efe3
No known key found for this signature in database

View File

@ -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);