diff --git a/apps/client/src/widgets/attachment_detail.ts b/apps/client/src/widgets/attachment_detail.ts index 29a2bf9ae..7f15c9fa6 100644 --- a/apps/client/src/widgets/attachment_detail.ts +++ b/apps/client/src/widgets/attachment_detail.ts @@ -76,23 +76,4 @@ export default class AttachmentDetailWidget extends BasicWidget { this.$wrapper.find(".attachment-content-wrapper").append($renderedContent); } - async copyAttachmentLinkToClipboard() { - if (this.attachment.role === "image") { - imageService.copyImageReferenceToClipboard(this.$wrapper.find(".attachment-content-wrapper")); - } else if (this.attachment.role === "file") { - const $link = await linkService.createLink(this.attachment.ownerId, { - referenceLink: true, - viewScope: { - viewMode: "attachments", - attachmentId: this.attachment.attachmentId - } - }); - - utils.copyHtmlToClipboard($link[0].outerHTML); - - toastService.showMessage(t("attachment_detail_2.link_copied")); - } else { - throw new Error(t("attachment_detail_2.unrecognized_role", { role: this.attachment.role })); - } - } } diff --git a/apps/client/src/widgets/buttons/attachments_actions.ts b/apps/client/src/widgets/buttons/attachments_actions.ts deleted file mode 100644 index 280e318bd..000000000 --- a/apps/client/src/widgets/buttons/attachments_actions.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { t } from "../../services/i18n.js"; -import BasicWidget from "../basic_widget.js"; -import server from "../../services/server.js"; -import dialogService from "../../services/dialog.js"; -import toastService from "../../services/toast.js"; -import ws from "../../services/ws.js"; -import appContext from "../../components/app_context.js"; -import openService from "../../services/open.js"; -import utils from "../../services/utils.js"; -import { Dropdown } from "bootstrap"; -import type FAttachment from "../../entities/fattachment.js"; -import type AttachmentDetailWidget from "../attachment_detail.js"; -import type { NoteRow } from "@triliumnext/commons"; - -const TPL = /*html*/` -