diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/assets/javascripts/blob | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/assets/javascripts/blob')
6 files changed, 19 insertions, 8 deletions
diff --git a/app/assets/javascripts/blob/components/blob_edit_content.vue b/app/assets/javascripts/blob/components/blob_edit_content.vue index a013d637c1d..73ccc3289b9 100644 --- a/app/assets/javascripts/blob/components/blob_edit_content.vue +++ b/app/assets/javascripts/blob/components/blob_edit_content.vue @@ -1,7 +1,7 @@ <script> import { debounce } from 'lodash'; import { initEditorLite } from '~/blob/utils'; -import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance_constants'; +import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance/constants'; import eventHub from './eventhub'; diff --git a/app/assets/javascripts/blob/components/blob_edit_header.vue b/app/assets/javascripts/blob/components/blob_edit_header.vue index 2cbbbddceeb..5715635fd13 100644 --- a/app/assets/javascripts/blob/components/blob_edit_header.vue +++ b/app/assets/javascripts/blob/components/blob_edit_header.vue @@ -50,6 +50,7 @@ export default { variant="danger" category="secondary" :disabled="!canDelete" + data-qa-selector="delete_file_button" @click="$emit('delete')" >{{ s__('Snippets|Delete file') }}</gl-button > diff --git a/app/assets/javascripts/blob/components/blob_header.vue b/app/assets/javascripts/blob/components/blob_header.vue index fd40c51fec1..a4a43b7a94e 100644 --- a/app/assets/javascripts/blob/components/blob_header.vue +++ b/app/assets/javascripts/blob/components/blob_header.vue @@ -66,7 +66,7 @@ export default { <template> <div class="js-file-title file-title-flex-parent"> <blob-filepath :blob="blob"> - <template #filepathPrepend> + <template #filepath-prepend> <slot name="prepend"></slot> </template> </blob-filepath> diff --git a/app/assets/javascripts/blob/components/blob_header_default_actions.vue b/app/assets/javascripts/blob/components/blob_header_default_actions.vue index daade611651..6eddec31166 100644 --- a/app/assets/javascripts/blob/components/blob_header_default_actions.vue +++ b/app/assets/javascripts/blob/components/blob_header_default_actions.vue @@ -32,6 +32,7 @@ export default { default: false, }, }, + inject: ['blobHash'], computed: { downloadUrl() { return `${this.rawPath}?inline=false`; @@ -39,6 +40,9 @@ export default { copyDisabled() { return this.activeViewer === RICH_BLOB_VIEWER; }, + getBlobHashTarget() { + return `[data-blob-hash="${this.blobHash}"]`; + }, }, BTN_COPY_CONTENTS_TITLE, BTN_DOWNLOAD_TITLE, @@ -53,7 +57,7 @@ export default { :aria-label="$options.BTN_COPY_CONTENTS_TITLE" :title="$options.BTN_COPY_CONTENTS_TITLE" :disabled="copyDisabled" - data-clipboard-target="#blob-code-content" + :data-clipboard-target="getBlobHashTarget" data-testid="copyContentsButton" icon="copy-to-clipboard" category="primary" diff --git a/app/assets/javascripts/blob/components/blob_header_filepath.vue b/app/assets/javascripts/blob/components/blob_header_filepath.vue index f99ecba2324..eb8068a8ad7 100644 --- a/app/assets/javascripts/blob/components/blob_header_filepath.vue +++ b/app/assets/javascripts/blob/components/blob_header_filepath.vue @@ -26,7 +26,7 @@ export default { </script> <template> <div class="file-header-content d-flex align-items-center lh-100"> - <slot name="filepathPrepend"></slot> + <slot name="filepath-prepend"></slot> <template v-if="blob.path"> <file-icon :file-name="blob.path" :size="18" aria-hidden="true" css-classes="mr-2" /> diff --git a/app/assets/javascripts/blob/pipeline_tour_success_modal.vue b/app/assets/javascripts/blob/pipeline_tour_success_modal.vue index 1412e49836d..02a522dda9d 100644 --- a/app/assets/javascripts/blob/pipeline_tour_success_modal.vue +++ b/app/assets/javascripts/blob/pipeline_tour_success_modal.vue @@ -9,8 +9,6 @@ const trackingMixin = Tracking.mixin(); export default { beginnerLink: 'https://about.gitlab.com/blog/2018/01/22/a-beginners-guide-to-continuous-integration/', - exampleLink: 'https://docs.gitlab.com/ee/ci/examples/', - codeQualityLink: 'https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html', goToTrackValuePipelines: 10, goToTrackValueMergeRequest: 20, trackEvent: 'click_button', @@ -39,6 +37,14 @@ export default { type: String, required: true, }, + exampleLink: { + type: String, + required: true, + }, + codeQualityLink: { + type: String, + required: true, + }, }, data() { return { @@ -93,7 +99,7 @@ export default { <p> <gl-sprintf :message="$options.i18n.bodyMessage"> <template #codeQualityLink="{content}"> - <gl-link :href="$options.codeQualityLink" target="_blank" class="font-size-inherit">{{ + <gl-link :href="codeQualityLink" target="_blank" class="font-size-inherit">{{ content }}</gl-link> </template> @@ -106,7 +112,7 @@ export default { </gl-link> </template> <template #exampleLink="{content}"> - <gl-link :href="$options.exampleLink" target="_blank"> + <gl-link :href="exampleLink" target="_blank"> {{ content }} </gl-link> </template> |