diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-29 18:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-29 18:09:48 +0300 |
commit | f4d51a9f71cf3d4b0874a3e1948fe3c1ea193c4d (patch) | |
tree | 7ae3da76e824c435167dd108721c0124ad2ee484 /app/assets/javascripts/blob | |
parent | 2dedd78ef505a0ab0a379c7340a3fcba56ada663 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/blob')
-rw-r--r-- | app/assets/javascripts/blob/components/blob_header.vue | 6 | ||||
-rw-r--r-- | app/assets/javascripts/blob/components/blob_header_default_actions.vue | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/app/assets/javascripts/blob/components/blob_header.vue b/app/assets/javascripts/blob/components/blob_header.vue index 9c023235428..4742b4ae4b4 100644 --- a/app/assets/javascripts/blob/components/blob_header.vue +++ b/app/assets/javascripts/blob/components/blob_header.vue @@ -25,6 +25,11 @@ export default { required: false, default: false, }, + isBinary: { + type: Boolean, + required: false, + default: false, + }, activeViewerType: { type: String, required: false, @@ -81,6 +86,7 @@ export default { :raw-path="blob.rawPath" :active-viewer="viewer" :has-render-error="hasRenderError" + :is-binary="isBinary" @copy="proxyCopyRequest" /> </div> 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 b9f2c5b42e4..2798a918b15 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,11 @@ export default { required: false, default: false, }, + isBinary: { + type: Boolean, + required: false, + default: false, + }, }, computed: { downloadUrl() { @@ -43,6 +48,9 @@ export default { getBlobHashTarget() { return `[data-blob-hash="${this.blobHash}"]`; }, + showCopyButton() { + return !this.hasRenderError && !this.isBinary; + }, }, BTN_COPY_CONTENTS_TITLE, BTN_DOWNLOAD_TITLE, @@ -52,7 +60,7 @@ export default { <template> <gl-button-group data-qa-selector="default_actions_container"> <gl-button - v-if="!hasRenderError" + v-if="showCopyButton" v-gl-tooltip.hover :aria-label="$options.BTN_COPY_CONTENTS_TITLE" :title="$options.BTN_COPY_CONTENTS_TITLE" @@ -65,6 +73,7 @@ export default { variant="default" /> <gl-button + v-if="!isBinary" v-gl-tooltip.hover :aria-label="$options.BTN_RAW_TITLE" :title="$options.BTN_RAW_TITLE" |