Merge branch 'main' of https://github.com/TriliumNext/Trilium
Checks / main (push) Successful in 4s
CodeQL Advanced / Analyze (actions) (push) Failing after 21m41s
CodeQL Advanced / Analyze (javascript-typescript) (push) Failing after 55s
Dev / Test development (push) Failing after 54s
Dev / Build Docker image (push) Has been skipped
Dev / Check Docker build (Dockerfile) (push) Has been skipped
Dev / Check Docker build (Dockerfile.alpine) (push) Has been skipped

This commit is contained in:
Adorian Doran
2026-05-02 12:24:23 +03:00
7 changed files with 23 additions and 0 deletions
@@ -173,6 +173,7 @@ export type CommandMappings = {
duplicateSubtree: ContextMenuCommandData;
expandSubtree: ContextMenuCommandData;
collapseSubtree: ContextMenuCommandData;
toggleArchivedNotes: CommandData;
sortChildNotes: ContextMenuCommandData;
copyNotePathToClipboard: ContextMenuCommandData;
recentChangesInSubtree: ContextMenuCommandData;
@@ -79,4 +79,8 @@ export default class MainTreeExecutors extends Component {
saveSelection: false
});
}
async toggleArchivedNotesCommand(){
await this.tree?.toggleArchivedNotes();
}
}
+5
View File
@@ -340,6 +340,11 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
return options.is(`hideArchivedNotes_${this.treeName}`);
}
async toggleArchivedNotes() {
await options.toggle(`hideArchivedNotes_${this.treeName}`);
await this.reloadTreeFromCache();
}
async setHideArchivedNotes(val: string) {
await options.save(`hideArchivedNotes_${this.treeName}`, val.toString());
}
@@ -11,6 +11,7 @@
"collapse-tree": "Collapses the complete note tree",
"collapse-subtree": "Collapses subtree of current note",
"sort-child-notes": "Sort child notes",
"toggle-archived-notes": "Show/hide archived (hidden) notes in the note tree",
"creating-and-moving-notes": "Creating and moving notes",
"create-note-after": "Create note after active note",
"create-note-into": "Create note as child of active note",
@@ -118,6 +119,7 @@
"collapse-tree": "Collapse Tree",
"collapse-subtree": "Collapse Subtree",
"sort-child-notes": "Sort Child Notes",
"toggle-archived-notes": "Toggle Archived Notes Visibility",
"create-note-after": "Create Note After",
"create-note-into": "Create Note Into",
"create-note-into-inbox": "Create Note Into Inbox",
@@ -68,6 +68,7 @@
"show-sql-console": "Afișează ecranul „Consolă SQL”",
"sixth-tab": "Activează cel de-al șaselea tab din listă",
"sort-child-notes": "Ordonează subnotițele",
"toggle-archived-notes": "Afișează/ascunde notițele arhivate (ascunse) din arborele de notițe",
"tabs-and-windows": "Tab-uri și ferestre",
"text-note-operations": "Operații asupra notițelor text",
"third-tab": "Activează cel de-al treilea tab din listă",
@@ -306,6 +307,7 @@
"collapse-tree": "Minimizează arborele de notițe",
"collapse-subtree": "Ascunde subnotițele",
"sort-child-notes": "Ordonează subnotițele",
"toggle-archived-notes": "Afișează/ascunde notițele arhivate",
"create-note-after": "Crează notiță după",
"create-note-into": "Crează subnotiță în",
"create-note-into-inbox": "Crează notiță în inbox",
@@ -113,6 +113,14 @@ function getDefaultKeyboardActions() {
description: t("keyboard_actions.sort-child-notes"),
scope: "note-tree"
},
{
actionName: "toggleArchivedNotes",
friendlyName: t("keyboard_action_names.toggle-archived-notes"),
iconClass: "bx bx-low-vision",
defaultShortcuts: (!isMac) ? ["Ctrl+H"] : ["CommandOrControl+Shift+H"],
description: t("keyboard_actions.toggle-archived-notes"),
scope: "window"
},
{
separator: t("keyboard_actions.creating-and-moving-notes")
@@ -10,6 +10,7 @@ const enum KeyboardActionNamesEnum {
collapseTree,
collapseSubtree,
sortChildNotes,
toggleArchivedNotes,
createNoteAfter,
createNoteInto,
createNoteIntoInbox,