mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
fix attr detail related notes
This commit is contained in:
parent
5e11806110
commit
04c93d6736
@ -84,6 +84,11 @@ async function renderTooltip(note, noteComplement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const someNotePath = treeService.getSomeNotePath(note);
|
const someNotePath = treeService.getSomeNotePath(note);
|
||||||
|
|
||||||
|
if (!someNotePath) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let content = $("<h5>").text(await treeService.getNotePathTitle(someNotePath)).prop('outerHTML');
|
let content = $("<h5>").text(await treeService.getNotePathTitle(someNotePath)).prop('outerHTML');
|
||||||
|
|
||||||
const attributes = note.getAttributes()
|
const attributes = note.getAttributes()
|
||||||
|
@ -67,6 +67,10 @@ const TPL = `
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export default class SimilarNotesWidget extends TabAwareWidget {
|
export default class SimilarNotesWidget extends TabAwareWidget {
|
||||||
|
isEnabled() {
|
||||||
|
return super.isEnabled() && !this.note.hasLabel('similarNotesWidgetDisabled');
|
||||||
|
}
|
||||||
|
|
||||||
doRender() {
|
doRender() {
|
||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
this.overflowing();
|
this.overflowing();
|
||||||
|
@ -119,8 +119,14 @@ async function searchFromRelation(note, relationName) {
|
|||||||
function getRelatedNotes(req) {
|
function getRelatedNotes(req) {
|
||||||
const attr = req.body;
|
const attr = req.body;
|
||||||
|
|
||||||
const matchingNameAndValue = searchService.searchNotes(formatAttrForSearch(attr, true));
|
const searchSettings = {
|
||||||
const matchingName = searchService.searchNotes(formatAttrForSearch(attr, false));
|
includeNoteContent: false,
|
||||||
|
excludeArchived: true,
|
||||||
|
fuzzyAttributeSearch: false
|
||||||
|
};
|
||||||
|
|
||||||
|
const matchingNameAndValue = searchService.findNotesWithQuery(formatAttrForSearch(attr, true), new SearchContext(searchSettings));
|
||||||
|
const matchingName = searchService.findNotesWithQuery(formatAttrForSearch(attr, false), new SearchContext(searchSettings));
|
||||||
|
|
||||||
const results = [];
|
const results = [];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user