Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client: Fix double question mark in attachments context menu (see #306)
Elian Doran808797a48b67
diff --git a/src/public/app/widgets/buttons/attachments_actions.js b/src/public/app/widgets/buttons/attachments_actions.jsindex a7bdf70ab8..c7841f340d 100644--- a/src/public/app/widgets/buttons/attachments_actions.js+++ b/src/public/app/widgets/buttons/attachments_actions.js@@ -77,21 +77,24 @@ export default class AttachmentActionsWidget extends BasicWidget {}});+ const isElectron = utils.isElectron();if (!this.isFullDetail) {const $openAttachmentButton = this.$widget.find("[data-trigger-command='openAttachment']");$openAttachmentButton.addClass("disabled").append($('<span class="disabled-tooltip"> (?)</span>').attr("title", t('attachments_actions.open_externally_detail_page'))- );- const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']");- $openAttachmentCustomButton- .addClass("disabled")- .append($('<span class="disabled-tooltip"> (?)</span>')- .attr("title", t('attachments_actions.open_externally_detail_page'))- );+ );+ if (isElectron) {+ const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']");+ $openAttachmentCustomButton+ .addClass("disabled")+ .append($('<span class="disabled-tooltip"> (?)</span>')+ .attr("title", t('attachments_actions.open_externally_detail_page'))+ );+ }}- if (!utils.isElectron()){+ if (!isElectron){const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']");$openAttachmentCustomButton.addClass("disabled")