Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fixes and right pane layout changes
zadam7270bf287df1
diff --git a/src/public/javascripts/services/tree_cache.js b/src/public/javascripts/services/tree_cache.jsindex 3d49c3e362..a81da05bf5 100644--- a/src/public/javascripts/services/tree_cache.js+++ b/src/public/javascripts/services/tree_cache.js@@ -105,8 +105,8 @@ class TreeCache {const targetNote = this.notes[attributeRow.value];if (targetNote) {- if (!note.targetRelations.includes(attributeId)) {- note.targetRelations.push(attributeId);+ if (!targetNote.targetRelations.includes(attributeId)) {+ targetNote.targetRelations.push(attributeId);}}}diff --git a/src/public/javascripts/services/ws.js b/src/public/javascripts/services/ws.jsindex 91c4a5f43a..7b1978d940 100644--- a/src/public/javascripts/services/ws.js+++ b/src/public/javascripts/services/ws.js@@ -288,7 +288,7 @@ async function processSyncRows(syncRows) {}if (targetNote) {- targetNote.targetRelations = targetNote.targetRelations.filter(attributeId => attributeId !== attribute.value);+ targetNote.targetRelations = targetNote.targetRelations.filter(attributeId => attributeId !== attribute.attributeId);}}}diff --git a/src/public/javascripts/widgets/collapsible_widget.js b/src/public/javascripts/widgets/collapsible_widget.jsindex 39551c7236..127ae2c4e3 100644--- a/src/public/javascripts/widgets/collapsible_widget.js+++ b/src/public/javascripts/widgets/collapsible_widget.js@@ -14,7 +14,7 @@ const WIDGET_TPL = `<div class="widget-header-actions"></div></div>- <div id="[to be set]" class="collapse body-wrapper" style="transition: none;">+ <div id="[to be set]" class="collapse body-wrapper" style="transition: none; "><div class="card-body"></div></div></div>@@ -27,26 +27,16 @@ export default class CollapsibleWidget extends TabAwareWidget {getHelp() { return {}; }- getMaxHeight() { return null; }-doRender() {this.$widget = $(WIDGET_TPL);this.$widget.find('[data-target]').attr('data-target', "#" + this.componentId);this.$bodyWrapper = this.$widget.find('.body-wrapper');- this.$bodyWrapper.attr('id', this.componentId);-+ this.$bodyWrapper.attr('id', this.componentId); // for toggle to work we need idthis.$bodyWrapper.collapse("show");this.$body = this.$bodyWrapper.find('.card-body');- const maxHeight = this.getMaxHeight();-- if (maxHeight) {- this.$body.css("max-height", maxHeight);- this.$body.css("overflow", "auto");- }-this.$title = this.$widget.find('.widget-title');this.$title.text(this.getWidgetTitle());diff --git a/src/public/javascripts/widgets/edited_notes.js b/src/public/javascripts/widgets/edited_notes.jsindex 4db1b421d9..3e47d7f6b1 100644--- a/src/public/javascripts/widgets/edited_notes.js+++ b/src/public/javascripts/widgets/edited_notes.js@@ -12,8 +12,6 @@ export default class EditedNotesWidget extends CollapsibleWidget {};}- getMaxHeight() { return "200px"; }-isEnabled() {return super.isEnabled()&& this.note.hasOwnedLabel("dateNote");diff --git a/src/public/javascripts/widgets/similar_notes.js b/src/public/javascripts/widgets/similar_notes.jsindex 05f77b9623..b0b7b96bd7 100644--- a/src/public/javascripts/widgets/similar_notes.js+++ b/src/public/javascripts/widgets/similar_notes.js@@ -12,8 +12,6 @@ export default class SimilarNotesWidget extends CollapsibleWidget {};}- getMaxHeight() { return "200px"; }-noteSwitched() {const noteId = this.noteId;diff --git a/src/public/javascripts/widgets/what_links_here.js b/src/public/javascripts/widgets/what_links_here.jsindex 0ba7769bab..d392ac2129 100644--- a/src/public/javascripts/widgets/what_links_here.js+++ b/src/public/javascripts/widgets/what_links_here.js@@ -4,8 +4,6 @@ import linkService from "../services/link.js";export default class WhatLinksHereWidget extends CollapsibleWidget {getWidgetTitle() { return "What links here"; }- getMaxHeight() { return "200px"; }-getHelp() {return {title: "This list contains all notes which link to this note through links and relations."diff --git a/src/public/stylesheets/desktop.css b/src/public/stylesheets/desktop.cssindex 141011ad33..7aba0c8bbf 100644--- a/src/public/stylesheets/desktop.css+++ b/src/public/stylesheets/desktop.css@@ -142,6 +142,9 @@ body {#right-pane .card {border: 0;+ min-height: 0;+ display: flex;+ flex-direction: column;}#right-pane .card-header {@@ -183,10 +186,16 @@ body {text-decoration: none;}+#right-pane .body-wrapper {+ overflow: auto;+}+#right-pane .card-body {width: 100%;padding: 8px;border: 0;+ height: 100%;+ overflow: auto;}#right-pane .card-body ul {