Skip to content

Build your personal knowledge base with Trilium Notes

fix(image compression): don't offer a run over images a locked vault hides

Elian Doranf7fc969ac777
diff --git a/apps/client/src/widgets/ribbon/NoteActions.tsx b/apps/client/src/widgets/ribbon/NoteActions.tsx
index a27a551d4d..b59a13c749 100644
--- a/apps/client/src/widgets/ribbon/NoteActions.tsx
+++ b/apps/client/src/widgets/ribbon/NoteActions.tsx
@@ -197,7 +197,7 @@ export function NoteContextMenu({ note, noteContext, itemsAtStart, itemsNearNote
{/* Always the note-level dialog, an image note included: it has children of its
own, and reaching them is what makes this "images" and not "image". */}
<CommandItem icon="bx bx-collapse-alt" text={t("compress-images")}
- disabled={isInOptionsOrHelp}
+ disabled={isInOptionsOrHelp || !isContentAvailable}
command={() => void showImageCompressionDialog({ type: "note", noteId: note.noteId })} />
<CommandItem command="showNoteOCRText" icon="bx bx-text" disabled={!["image", "file"].includes(noteType) || !isContentAvailable} text={t("note_actions.view_ocr_text")} />
{(syncServerHost && isElectron) &&