mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
refactor(client): use workaround for TS error
This commit is contained in:
parent
4883debd8d
commit
560b7ebe35
@ -10,6 +10,7 @@ import utils from "../../services/utils.js";
|
|||||||
import { Dropdown } from "bootstrap";
|
import { Dropdown } from "bootstrap";
|
||||||
import type attachmentsApiRoute from "../../../../routes/api/attachments.js"
|
import type attachmentsApiRoute from "../../../../routes/api/attachments.js"
|
||||||
import type FAttachment from "../../entities/fattachment.js";
|
import type FAttachment from "../../entities/fattachment.js";
|
||||||
|
import type AttachmentDetailWidget from "../attachment_detail.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
<div class="dropdown attachment-actions">
|
<div class="dropdown attachment-actions">
|
||||||
@ -150,10 +151,9 @@ export default class AttachmentActionsWidget extends BasicWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async copyAttachmentLinkToClipboardCommand() {
|
async copyAttachmentLinkToClipboardCommand() {
|
||||||
//TriliumNextTODO: the parent here is AttachmentDetailWidget
|
if (this.parent && "copyAttachmentLinkToClipboard" in this.parent) {
|
||||||
//how can we pass that to the generic TypedComponent<any>?
|
(this.parent as AttachmentDetailWidget).copyAttachmentLinkToClipboard();
|
||||||
//@ts-ignore - TypedComponent<any>
|
}
|
||||||
this.parent?.copyAttachmentLinkToClipboard();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteAttachmentCommand() {
|
async deleteAttachmentCommand() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user