mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 22:05:44 +01:00
client: Fix double question mark in attachments context menu (see #306)
This commit is contained in:
@@ -77,6 +77,7 @@ export default class AttachmentActionsWidget extends BasicWidget {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isElectron = utils.isElectron();
|
||||||
if (!this.isFullDetail) {
|
if (!this.isFullDetail) {
|
||||||
const $openAttachmentButton = this.$widget.find("[data-trigger-command='openAttachment']");
|
const $openAttachmentButton = this.$widget.find("[data-trigger-command='openAttachment']");
|
||||||
$openAttachmentButton
|
$openAttachmentButton
|
||||||
@@ -84,6 +85,7 @@ export default class AttachmentActionsWidget extends BasicWidget {
|
|||||||
.append($('<span class="disabled-tooltip"> (?)</span>')
|
.append($('<span class="disabled-tooltip"> (?)</span>')
|
||||||
.attr("title", t('attachments_actions.open_externally_detail_page'))
|
.attr("title", t('attachments_actions.open_externally_detail_page'))
|
||||||
);
|
);
|
||||||
|
if (isElectron) {
|
||||||
const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']");
|
const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']");
|
||||||
$openAttachmentCustomButton
|
$openAttachmentCustomButton
|
||||||
.addClass("disabled")
|
.addClass("disabled")
|
||||||
@@ -91,7 +93,8 @@ export default class AttachmentActionsWidget extends BasicWidget {
|
|||||||
.attr("title", t('attachments_actions.open_externally_detail_page'))
|
.attr("title", t('attachments_actions.open_externally_detail_page'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!utils.isElectron()){
|
}
|
||||||
|
if (!isElectron){
|
||||||
const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']");
|
const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']");
|
||||||
$openAttachmentCustomButton
|
$openAttachmentCustomButton
|
||||||
.addClass("disabled")
|
.addClass("disabled")
|
||||||
|
|||||||
Reference in New Issue
Block a user