mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
attribute fixes
This commit is contained in:
@@ -45,7 +45,13 @@ async function mouseEnterHandler() {
|
||||
const note = await treeCache.getNote(noteId);
|
||||
const noteComplement = await treeCache.getNoteComplement(noteId);
|
||||
|
||||
const html = '<div class="note-tooltip-content">' + await renderTooltip(note, noteComplement) + '</div>';
|
||||
const content = await renderTooltip(note, noteComplement);
|
||||
|
||||
if (utils.isHtmlEmpty(content)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const html = '<div class="note-tooltip-content">' + content + '</div>';
|
||||
|
||||
// we need to check if we're still hovering over the element
|
||||
// since the operation to get tooltip content was async, it is possible that
|
||||
|
||||
@@ -159,6 +159,11 @@ const ATTR_TITLES = {
|
||||
};
|
||||
|
||||
export default class AttributeDetailWidget extends TabAwareWidget {
|
||||
isEnabled() {
|
||||
// this widget is not activated in a standard way
|
||||
return false;
|
||||
}
|
||||
|
||||
doRender() {
|
||||
this.relatedNotesSpacedUpdate = new SpacedUpdate(async () => this.updateRelatedNotes(), 1000);
|
||||
|
||||
@@ -262,8 +267,6 @@ export default class AttributeDetailWidget extends TabAwareWidget {
|
||||
this.hide();
|
||||
}
|
||||
});
|
||||
|
||||
this.toggleInt(false); // initial state is hidden
|
||||
}
|
||||
|
||||
userEditedAttribute() {
|
||||
@@ -293,7 +296,8 @@ export default class AttributeDetailWidget extends TabAwareWidget {
|
||||
this.allAttributes = allAttributes;
|
||||
this.attribute = attribute;
|
||||
|
||||
await this.updateRelatedNotes();
|
||||
// can be slightly slower so just make it async
|
||||
this.updateRelatedNotes();
|
||||
|
||||
this.$attrSaveDeleteButtonContainer.toggle(!!isOwned);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user