mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
791 B
791 B
Hidden notes
Disallow adding child notes
- To enforce at server level go to
services/notes.ts
and look for thegetAndValidateParent
method. Look for theparams.ignoreForbiddenParents
if statement and add it there. - To hide the plus button in the note tree, go to
widgets/note_tree
in the client and look forenhanceTitle
. Look for the if statement which starts with!["search", "launcher"].includes(note.type)
. - To disable it from the contextual menu, go to
tree_context_menu
and look for thegetMenuItems
method. There look for theinsertNoteAfter
andinsertChildNote
actions and look at theirenabled
conditions. If adding a big note type with lots of child notes, see the pattern of optinos & help (rename and augment thenotOptionsOrHelp
variable.