feat(note_actions): hide options in attachments

This commit is contained in:
Elian Doran 2025-12-10 22:27:56 +02:00
parent db720acc18
commit 06a5298efa
No known key found for this signature in database

View File

@ -60,6 +60,7 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
const isHelpPage = note.noteId.startsWith("_help"); const isHelpPage = note.noteId.startsWith("_help");
const [syncServerHost] = useTriliumOption("syncServerHost"); const [syncServerHost] = useTriliumOption("syncServerHost");
const { isReadOnly, enableEditing } = useIsNoteReadOnly(note, noteContext); const { isReadOnly, enableEditing } = useIsNoteReadOnly(note, noteContext);
const isNormalViewMode = noteContext?.viewScope?.viewMode === "default";
return ( return (
<Dropdown <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")} />} {isElectron && <CommandItem command="exportAsPdf" icon="bx bxs-file-pdf" disabled={!isPrintable} text={t("note_actions.print_pdf")} />}
<FormDropdownDivider /> <FormDropdownDivider />
{isNewLayout && !isHelpPage && <> {isNewLayout && isNormalViewMode && !isHelpPage && <>
<NoteBasicProperties note={note} /> <NoteBasicProperties note={note} />
<FormDropdownDivider /> <FormDropdownDivider />
</>} </>}