mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 14:25:51 +01:00
Link entity migrated to Attribute, WIP
This commit is contained in:
31
src/public/javascripts/widgets/what_links_here.js
Normal file
31
src/public/javascripts/widgets/what_links_here.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import StandardWidget from "./standard_widget.js";
|
||||
|
||||
class WhatLinksHereWidget extends StandardWidget {
|
||||
getWidgetTitle() { return "What links here"; }
|
||||
|
||||
async doRenderBody() {
|
||||
|
||||
|
||||
const $noteId = this.$body.find(".note-info-note-id");
|
||||
const $dateCreated = this.$body.find(".note-info-date-created");
|
||||
const $dateModified = this.$body.find(".note-info-date-modified");
|
||||
const $type = this.$body.find(".note-info-type");
|
||||
const $mime = this.$body.find(".note-info-mime");
|
||||
|
||||
const note = this.ctx.note;
|
||||
|
||||
$noteId.text(note.noteId);
|
||||
$dateCreated.text(note.dateCreated);
|
||||
$dateModified.text(note.dateModified);
|
||||
$type.text(note.type);
|
||||
$mime.text(note.mime);
|
||||
}
|
||||
|
||||
syncDataReceived(syncData) {
|
||||
if (syncData.find(sd => sd.entityName === 'notes' && sd.entityId === this.ctx.note.noteId)) {
|
||||
this.doRenderBody();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default WhatLinksHereWidget;
|
||||
Reference in New Issue
Block a user