Skip to content

Build your personal knowledge base with Trilium Notes

feat(tree): distinguish spotlighted node

Elian Doran712e87b39f21
diff --git a/apps/client/src/widgets/note_tree.css b/apps/client/src/widgets/note_tree.css
index 4ab73d6fef..6e3b90dca9 100644
--- a/apps/client/src/widgets/note_tree.css
+++ b/apps/client/src/widgets/note_tree.css
@@ -1,14 +1,21 @@
-.note-indicator-icon.subtree-hidden-badge {
- font-family: inherit !important;
- margin-inline-start: 0.5em;
- background: var(--left-pane-item-action-button-background);
- color: var(--left-pane-item-action-button-color);
- padding: 0.2em 0.4em;
- border-radius: 0.5em;
- font-size: 0.7rem;
- font-weight: normal;
- position: absolute;
- top: 50%;
- right: 0.6em;
- transform: translateY(-50%);
+#left-pane .tree-wrapper {
+ .note-indicator-icon.subtree-hidden-badge {
+ font-family: inherit !important;
+ margin-inline-start: 0.5em;
+ background: var(--left-pane-item-action-button-background);
+ color: var(--left-pane-item-action-button-color);
+ padding: 0.2em 0.4em;
+ border-radius: 0.5em;
+ font-size: 0.7rem;
+ font-weight: normal;
+ position: absolute;
+ top: 50%;
+ right: 0.6em;
+ transform: translateY(-50%);
+ }
+
+ .spotlighted-node {
+ opacity: 0.8;
+ font-style: italic;
+ }
}
diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.ts
index de73efeaaf..1e4866b0f6 100644
--- a/apps/client/src/widgets/note_tree.ts
+++ b/apps/client/src/widgets/note_tree.ts
@@ -857,6 +857,10 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
extraClasses.push(...["tinted", colorClass]);
}
+ if (this.spotlightedNotePath && this.spotlightedNotePath.endsWith(`/${note.noteId}`)) {
+ extraClasses.push("spotlighted-node");
+ }
+
return extraClasses.join(" ");
}