mirror of
https://github.com/zadam/trilium.git
synced 2025-12-13 19:04:25 +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 isMac = getIsMac();
|
||||||
const hasSource = ["text", "code", "relationMap", "mermaid", "canvas", "mindMap", "aiChat"].includes(noteType);
|
const hasSource = ["text", "code", "relationMap", "mermaid", "canvas", "mindMap", "aiChat"].includes(noteType);
|
||||||
const isSearchOrBook = ["search", "book"].includes(noteType);
|
const isSearchOrBook = ["search", "book"].includes(noteType);
|
||||||
|
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);
|
||||||
|
|
||||||
@ -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")} />}
|
{isElectron && <CommandItem command="exportAsPdf" icon="bx bxs-file-pdf" disabled={!isPrintable} text={t("note_actions.print_pdf")} />}
|
||||||
<FormDropdownDivider />
|
<FormDropdownDivider />
|
||||||
|
|
||||||
{isNewLayout && <NoteBasicProperties note={note} />}
|
{isNewLayout && !isHelpPage && <>
|
||||||
<FormDropdownDivider />
|
<NoteBasicProperties note={note} />
|
||||||
|
<FormDropdownDivider />
|
||||||
|
</>}
|
||||||
|
|
||||||
<CommandItem icon="bx bx-import" text={t("note_actions.import_files")}
|
<CommandItem icon="bx bx-import" text={t("note_actions.import_files")}
|
||||||
disabled={isInOptionsOrHelp || note.type === "search"}
|
disabled={isInOptionsOrHelp || note.type === "search"}
|
||||||
@ -112,7 +115,10 @@ function NoteContextMenu({ note, noteContext }: { note: FNote, noteContext?: Not
|
|||||||
<FormDropdownDivider />
|
<FormDropdownDivider />
|
||||||
|
|
||||||
<CommandItem command="showAttachments" icon="bx bx-paperclip" disabled={isInOptionsOrHelp} text={t("note_actions.note_attachments")} />
|
<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>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user