mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
refactor widget constructor
This commit is contained in:
@@ -24,21 +24,15 @@ const linkOverlays = [
|
||||
];
|
||||
|
||||
class LinkMapWidget extends StandardWidget {
|
||||
/**
|
||||
* @param {TabContext} ctx
|
||||
* @param {object} state
|
||||
*/
|
||||
constructor(ctx, state) {
|
||||
super(ctx, state);
|
||||
|
||||
this.$title.text("Link map");
|
||||
getWidgetTitle() { return "Link map"; }
|
||||
|
||||
getHeaderActions() {
|
||||
const $showFullButton = $("<a>").append("show full").addClass('widget-header-action');
|
||||
$showFullButton.click(() => {
|
||||
linkMapDialog.showDialog();
|
||||
});
|
||||
|
||||
this.$headerActions.append($showFullButton);
|
||||
return [$showFullButton];
|
||||
}
|
||||
|
||||
async doRenderBody() {
|
||||
|
||||
Reference in New Issue
Block a user