mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 03:58:53 +08:00
attribute fixes
This commit is contained in:
parent
625483a8f2
commit
a87b710626
4 changed files with 25 additions and 15 deletions
20
package-lock.json
generated
20
package-lock.json
generated
|
@ -1882,7 +1882,7 @@
|
|||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
|
@ -2930,7 +2930,7 @@
|
|||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
|
@ -4789,9 +4789,9 @@
|
|||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
|
||||
},
|
||||
"helmet": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.0.0.tgz",
|
||||
"integrity": "sha512-HyoRKKHhWhO6+EBfgRLkuZR4/+NXc1nJB7x0bWwW89i9eoPciK0qUqyZNOA/zowpgrW9C4+J5toqMkZrpBOlkg=="
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.1.0.tgz",
|
||||
"integrity": "sha512-KWy75fYN8hOG2Rhl8e5B3WhOzb0by1boQum85TiddIE9iu6gV+TXbUjVC17wfej0o/ZUpqB9kxM0NFCZRMzf+Q=="
|
||||
},
|
||||
"hosted-git-info": {
|
||||
"version": "2.8.5",
|
||||
|
@ -6028,7 +6028,7 @@
|
|||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||
},
|
||||
"minipass": {
|
||||
|
@ -6149,7 +6149,7 @@
|
|||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
|
@ -6157,7 +6157,7 @@
|
|||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||
}
|
||||
}
|
||||
|
@ -7098,7 +7098,7 @@
|
|||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
|
@ -8176,7 +8176,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
"express-session": "1.17.1",
|
||||
"file-type": "14.7.1",
|
||||
"fs-extra": "9.0.1",
|
||||
"helmet": "4.0.0",
|
||||
"helmet": "4.1.0",
|
||||
"html": "1.0.0",
|
||||
"html2plaintext": "2.1.2",
|
||||
"http-proxy-agent": "4.0.1",
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue