diff --git a/src/public/app/widgets/buttons/note_actions.js b/src/public/app/widgets/buttons/note_actions.js index 48b4895f5..bba7332ef 100644 --- a/src/public/app/widgets/buttons/note_actions.js +++ b/src/public/app/widgets/buttons/note_actions.js @@ -35,7 +35,7 @@ const TPL = ` ${t('note_actions.re_render_note')} ${t('note_actions.search_in_note')} ${t('note_actions.note_source')} - ${t('note_actions.note_attachments')} + ${t('note_actions.note_attachments')} @@ -63,6 +63,7 @@ export default class NoteActionsWidget extends NoteContextAwareWidget { this.$findInTextButton = this.$widget.find('.find-in-text-button'); this.$printActiveNoteButton = this.$widget.find('.print-active-note-button'); this.$showSourceButton = this.$widget.find('.show-source-button'); + this.$showAttachmentsButton = this.$widget.find('.show-attachments-button'); this.$renderNoteButton = this.$widget.find('.render-note-button'); this.$exportNoteButton = this.$widget.find('.export-note-button'); @@ -96,10 +97,13 @@ export default class NoteActionsWidget extends NoteContextAwareWidget { } async refreshVisibility(note) { + const isInOptions = note.noteId.startsWith("_options"); + this.$convertNoteIntoAttachmentButton.toggle(note.isEligibleForConversionToAttachment()); this.toggleDisabled(this.$findInTextButton, ['text', 'code', 'book'].includes(note.type)); + this.toggleDisabled(this.$showAttachmentsButton, !isInOptions); this.toggleDisabled(this.$showSourceButton, ['text', 'code', 'relationMap', 'mermaid', 'canvas'].includes(note.type)); this.toggleDisabled(this.$printActiveNoteButton, ['text', 'code'].includes(note.type));