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
added hidePromotedAttributes label, fixes #221
azivnerabbade96afa0
diff --git a/src/public/javascripts/services/attributes.js b/src/public/javascripts/services/attributes.jsindex 07c796a40e..e0de78f140 100644--- a/src/public/javascripts/services/attributes.js+++ b/src/public/javascripts/services/attributes.js@@ -26,7 +26,8 @@ async function getAttributes() {async function showAttributes() {$promotedAttributesContainer.empty();- $attributeList.hide().empty();+ $attributeList.hide();+ $attributeListInner.empty();const note = noteDetailService.getCurrentNote();@@ -37,7 +38,9 @@ async function showAttributes() {&& !attr.name.startsWith("child:")&& attr.value.isPromoted);- if (promoted.length > 0) {+ const hidePromotedAttributes = attributes.some(attr => attr.type === 'label' && attr.name === 'hidePromotedAttributes');++ if (promoted.length > 0 && !hidePromotedAttributes) {const $tbody = $("<tbody>");for (const definitionAttr of promoted) {diff --git a/src/public/javascripts/services/note_detail_relation_map.js b/src/public/javascripts/services/note_detail_relation_map.jsindex 4846b41c31..d763f026f7 100644--- a/src/public/javascripts/services/note_detail_relation_map.js+++ b/src/public/javascripts/services/note_detail_relation_map.js@@ -528,9 +528,7 @@ $centerButton.click(() => {let averageX = totalX / mapData.notes.length;let averageY = totalY / mapData.notes.length;- console.log(averageX, averageY);-- //pzInstance.moveTo(averageX, averageY);+ pzInstance.moveTo(averageX, averageY);});$component.on("drop", dropNoteOntoRelationMapHandler);diff --git a/src/services/attributes.js b/src/services/attributes.jsindex 39e41f8b28..e863daf638 100644--- a/src/services/attributes.js+++ b/src/services/attributes.js@@ -16,6 +16,7 @@ const BUILTIN_ATTRIBUTES = [{ type: 'label', name: 'disableInclusion' },{ type: 'label', name: 'appCss' },{ type: 'label', name: 'hideChildrenOverview' },+ { type: 'label', name: 'hidePromotedAttributes' },// relation names{ type: 'relation', name: 'runOnNoteView' },