mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 10:24:23 +01:00
feat(note_actions): hide options in help pages
This commit is contained in:
parent
8d8ff25bae
commit
db720acc18
@ -57,6 +57,7 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
|
||||
const isMac = getIsMac();
|
||||
const hasSource = ["text", "code", "relationMap", "mermaid", "canvas", "mindMap", "aiChat"].includes(noteType);
|
||||
const isSearchOrBook = ["search", "book"].includes(noteType);
|
||||
const isHelpPage = note.noteId.startsWith("_help");
|
||||
const [syncServerHost] = useTriliumOption("syncServerHost");
|
||||
const { isReadOnly, enableEditing } = useIsNoteReadOnly(note, noteContext);
|
||||
|
||||
@ -81,8 +82,10 @@ 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 && <NoteBasicProperties note={note} />}
|
||||
<FormDropdownDivider />
|
||||
{isNewLayout && !isHelpPage && <>
|
||||
<NoteBasicProperties note={note} />
|
||||
<FormDropdownDivider />
|
||||
</>}
|
||||
|
||||
<CommandItem icon="bx bx-import" text={t("note_actions.import_files")}
|
||||
disabled={isInOptionsOrHelp || note.type === "search"}
|
||||
@ -112,7 +115,10 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
|
||||
<FormDropdownDivider />
|
||||
|
||||
<CommandItem command="showAttachments" icon="bx bx-paperclip" disabled={isInOptionsOrHelp} text={t("note_actions.note_attachments")} />
|
||||
{glob.isDev && <DevelopmentActions note={note} noteContext={noteContext} />}
|
||||
{glob.isDev && <>
|
||||
<FormDropdownDivider />
|
||||
<DevelopmentActions note={note} noteContext={noteContext} />
|
||||
</>}
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user