Skip to content

Build your personal knowledge base with Trilium Notes

small fixes

zadam0973498fe9c8
diff --git a/src/public/javascripts/entities/note_short.js b/src/public/javascripts/entities/note_short.js
index 884f4c6b30..271bc0b3c9 100644
--- a/src/public/javascripts/entities/note_short.js
+++ b/src/public/javascripts/entities/note_short.js
@@ -183,7 +183,10 @@ class NoteShort {
if (this.noteId !== 'root') {
for (const parentNote of this.getParentNotes()) {
- attrArrs.push(parentNote.getInheritableAttributes());
+ // these virtual parent-child relationships are also loaded into frontend tree cache
+ if (parentNote.type !== 'search') {
+ attrArrs.push(parentNote.getInheritableAttributes());
+ }
}
}
diff --git a/src/public/javascripts/widgets/standard_top_widget.js b/src/public/javascripts/widgets/standard_top_widget.js
index fb3b14968a..7a21379625 100644
--- a/src/public/javascripts/widgets/standard_top_widget.js
+++ b/src/public/javascripts/widgets/standard_top_widget.js
@@ -74,9 +74,17 @@ export default class StandardTopWidget extends BasicWidget {
this.$widget.find(".jump-to-note-dialog-button").on('click', () => this.triggerCommand('jumpToNote'));
this.$widget.find(".recent-changes-button").on('click', () => this.triggerCommand('showRecentChanges'));
- this.$widget.find(".enter-protected-session-button").on('click', protectedSessionService.enterProtectedSession);
- this.$widget.find(".leave-protected-session-button").on('click', protectedSessionService.leaveProtectedSession);
+ this.$enterProtectedSessionButton = this.$widget.find(".enter-protected-session-button");
+ this.$enterProtectedSessionButton.on('click', protectedSessionService.enterProtectedSession);
+
+ this.$leaveProtectedSessionButton = this.$widget.find(".leave-protected-session-button");
+ this.$leaveProtectedSessionButton.on('click', protectedSessionService.leaveProtectedSession);
return this.$widget
}
+
+ protectedSessionStartedEvent() {
+ this.$enterProtectedSessionButton.hide();
+ this.$leaveProtectedSessionButton.show();
+ }
}
\ No newline at end of file