import StandardWidget from "./standard_widget.js"; import linkService from "../services/link.js"; class WhatLinksHereWidget extends StandardWidget { getWidgetTitle() { return "What links here"; } getMaxHeight() { return "200px"; } getHelp() { return { title: "This list contains all notes which link to this note through links and relations." }; } getHeaderActions() { const $showFullButton = $("").append("show link map").addClass('widget-header-action'); $showFullButton.click(async () => { const linkMapDialog = await import("../dialogs/link_map.js"); linkMapDialog.showDialog(); }); return [$showFullButton]; } async doRenderBody() { const targetRelations = await this.ctx.note.getTargetRelations(); if (targetRelations.length === 0) { this.$body.text("Nothing links here yet ..."); return; } const $list = $("