mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 18:34:24 +01:00
feat(note_actions): hide options in attachments
This commit is contained in:
parent
db720acc18
commit
06a5298efa
@ -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 />
|
||||||
</>}
|
</>}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user