mirror of
https://github.com/zadam/trilium.git
synced 2026-03-04 00:37:30 +01:00
feat(tree): add tooltip when moving into hidden subtree
This commit is contained in:
parent
0f77caad69
commit
db57f3ff62
@ -1773,7 +1773,11 @@
|
|||||||
"clone-indicator-tooltip-single": "This note is cloned (1 additional parent: {{- parent}})",
|
"clone-indicator-tooltip-single": "This note is cloned (1 additional parent: {{- parent}})",
|
||||||
"shared-indicator-tooltip": "This note is shared publicly",
|
"shared-indicator-tooltip": "This note is shared publicly",
|
||||||
"shared-indicator-tooltip-with-url": "This note is shared publicly at: {{- url}}",
|
"shared-indicator-tooltip-with-url": "This note is shared publicly at: {{- url}}",
|
||||||
"subtree-hidden-tooltip": "{{count}} child notes that are hidden from the tree"
|
"subtree-hidden-tooltip": "{{count}} child notes that are hidden from the tree",
|
||||||
|
"subtree-hidden-moved-title_one": "{{count}} note moved to {{title}}",
|
||||||
|
"subtree-hidden-moved-title_other": "{{count}} notes moved to {{title}}",
|
||||||
|
"subtree-hidden-moved-description-collection": "Items in this collection are managed by its views.",
|
||||||
|
"subtree-hidden-moved-description-other": "Items in this note are intentionally hidden."
|
||||||
},
|
},
|
||||||
"title_bar_buttons": {
|
"title_bar_buttons": {
|
||||||
"window-on-top": "Keep Window on Top"
|
"window-on-top": "Keep Window on Top"
|
||||||
|
|||||||
@ -555,6 +555,19 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
|||||||
} else if (data.hitMode === "after") {
|
} else if (data.hitMode === "after") {
|
||||||
branchService.moveAfterBranch(selectedBranchIds, node.data.branchId);
|
branchService.moveAfterBranch(selectedBranchIds, node.data.branchId);
|
||||||
} else if (data.hitMode === "over") {
|
} else if (data.hitMode === "over") {
|
||||||
|
const targetNote = froca.getNoteFromCache(node.data.noteId);
|
||||||
|
if (targetNote?.hasLabel("subtreeHidden")) {
|
||||||
|
toastService.showPersistent({
|
||||||
|
id: `subtree-hidden-moved`,
|
||||||
|
title: t("note_tree.subtree-hidden-moved-title", { count: selectedBranchIds.length, title: targetNote.title }),
|
||||||
|
message: targetNote.type === "book"
|
||||||
|
? t("note_tree.subtree-hidden-moved-description-collection")
|
||||||
|
: t("note_tree.subtree-hidden-moved-description-other"),
|
||||||
|
icon: "bx bx-hide",
|
||||||
|
timeout: 5_000,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
branchService.moveToParentNote(selectedBranchIds, node.data.branchId);
|
branchService.moveToParentNote(selectedBranchIds, node.data.branchId);
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Unknown hitMode '${data.hitMode}'`);
|
throw new Error(`Unknown hitMode '${data.hitMode}'`);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user