diff options
Diffstat (limited to 'app/assets/javascripts/design_management/components/design_notes/design_note.vue')
-rw-r--r-- | app/assets/javascripts/design_management/components/design_notes/design_note.vue | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/design_management/components/design_notes/design_note.vue b/app/assets/javascripts/design_management/components/design_notes/design_note.vue index 54ffd986588..b247f17fd97 100644 --- a/app/assets/javascripts/design_management/components/design_notes/design_note.vue +++ b/app/assets/javascripts/design_management/components/design_notes/design_note.vue @@ -13,6 +13,7 @@ import SafeHtml from '~/vue_shared/directives/safe_html'; import { getIdFromGraphQLId, convertToGraphQLId } from '~/graphql_shared/utils'; import { TYPENAME_USER } from '~/graphql_shared/constants'; import { __ } from '~/locale'; +import { setUrlFragment } from '~/lib/utils/url_utility'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; import EmojiPicker from '~/emoji/components/picker.vue'; @@ -29,6 +30,7 @@ export default { editCommentLabel: __('Edit comment'), moreActionsLabel: __('More actions'), deleteCommentText: __('Delete comment'), + copyCommentLink: __('Copy link'), }, components: { DesignNoteAwardsList, @@ -133,6 +135,18 @@ export default { }, }, { + text: this.$options.i18n.copyCommentLink, + action: () => { + this.$toast.show(__('Link copied to clipboard.')); + }, + extraAttrs: { + 'data-clipboard-text': setUrlFragment( + window.location.href, + `note_${this.noteAnchorId}`, + ), + }, + }, + { text: this.$options.i18n.deleteCommentText, action: () => { this.$emit('delete-note', this.note); |