Skip to content

Build your personal knowledge base with Trilium Notes

feat(note_actions): hide options in attachments

Elian Doran06a5298efa1d
diff --git a/apps/client/src/widgets/ribbon/NoteActions.tsx b/apps/client/src/widgets/ribbon/NoteActions.tsx
index 7334aefa7a..85ce630139 100644
--- a/apps/client/src/widgets/ribbon/NoteActions.tsx
+++ b/apps/client/src/widgets/ribbon/NoteActions.tsx
@@ -60,6 +60,7 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
const isHelpPage = note.noteId.startsWith("_help");
const [syncServerHost] = useTriliumOption("syncServerHost");
const { isReadOnly, enableEditing } = useIsNoteReadOnly(note, noteContext);
+ const isNormalViewMode = noteContext?.viewScope?.viewMode === "default";
return (
<Dropdown
@@ -82,7 +83,7 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
{isElectron && <CommandItem command="exportAsPdf" icon="bx bxs-file-pdf" disabled={!isPrintable} text={t("note_actions.print_pdf")} />}
<FormDropdownDivider />
- {isNewLayout && !isHelpPage && <>
+ {isNewLayout && isNormalViewMode && !isHelpPage && <>
<NoteBasicProperties note={note} />
<FormDropdownDivider />
</>}