import CollapsibleWidget from "./collapsible_widget.js"; import linkService from "../services/link.js"; export default class WhatLinksHereWidget extends CollapsibleWidget { get widgetTitle() { return "What links here"; } get help() { return { title: "This list contains all notes which link to this note through links and relations." }; } get headerActions() { const $showFullButton = $("").append("show link map").addClass('widget-header-action'); $showFullButton.on('click', async () => { const linkMapDialog = await import("../dialogs/link_map.js"); linkMapDialog.showDialog(); }); return [$showFullButton]; } async refreshWithNote(note) { const targetRelations = note.getTargetRelations(); if (targetRelations.length === 0) { this.$body.text("Nothing links here yet ..."); return; } const $list = $("