diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-08 21:08:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-08 21:08:29 +0300 |
commit | 842ac3526cba09feb4b9ccefd0aeeb6edc02035d (patch) | |
tree | 2b73dca2be277685aefdc4f775c211049b4dae7c /app/assets/javascripts/vue_shared/components/source_viewer | |
parent | 9f9dc2bc412632e6b459d0bb9e1ac205c8cf34af (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/source_viewer')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/source_viewer/source_viewer.vue | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer.vue b/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer.vue index 15411e8d17e..edf2229a9a1 100644 --- a/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/source_viewer/source_viewer.vue @@ -1,6 +1,7 @@ <script> import { GlSafeHtmlDirective, GlLoadingIcon } from '@gitlab/ui'; import LineHighlighter from '~/blob/line_highlighter'; +import eventHub from '~/notes/event_hub'; import { ROUGE_TO_HLJS_LANGUAGE_MAP, LINES_PER_CHUNK } from './constants'; import Chunk from './components/chunk.vue'; @@ -102,6 +103,8 @@ export default { Object.assign(chunk, { language, content: highlightedContent, isHighlighted: true }); this.selectLine(); + + this.$nextTick(() => eventHub.$emit('showBlobInteractionZones', this.blob.path)); }, highlight(content, language) { let detectedLanguage = language; @@ -153,6 +156,7 @@ export default { class="file-content code js-syntax-highlight blob-content gl-display-flex gl-flex-direction-column gl-overflow-auto" :class="$options.userColorScheme" data-type="simple" + :data-path="blob.path" data-qa-selector="blob_viewer_file_content" > <chunk |