Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/blob/components/blob_header.vue')
-rw-r--r--app/assets/javascripts/blob/components/blob_header.vue15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/blob/components/blob_header.vue b/app/assets/javascripts/blob/components/blob_header.vue
index 1645469a218..c5ab28e6ec5 100644
--- a/app/assets/javascripts/blob/components/blob_header.vue
+++ b/app/assets/javascripts/blob/components/blob_header.vue
@@ -42,6 +42,11 @@ export default {
required: false,
default: false,
},
+ showPath: {
+ type: Boolean,
+ required: false,
+ default: true,
+ },
},
data() {
return {
@@ -55,6 +60,9 @@ export default {
showDefaultActions() {
return !this.hideDefaultActions;
},
+ isEmpty() {
+ return this.blob.rawSize === 0;
+ },
},
watch: {
viewer(newVal, oldVal) {
@@ -74,7 +82,7 @@ export default {
<div class="js-file-title file-title-flex-parent">
<div class="gl-display-flex">
<table-of-contents class="gl-pr-2" />
- <blob-filepath :blob="blob">
+ <blob-filepath :blob="blob" :show-path="showPath">
<template #filepath-prepend>
<slot name="prepend"></slot>
</template>
@@ -88,10 +96,13 @@ export default {
<default-actions
v-if="showDefaultActions"
- :raw-path="blob.rawPath"
+ :raw-path="blob.externalStorageUrl || blob.rawPath"
:active-viewer="viewer"
:has-render-error="hasRenderError"
:is-binary="isBinary"
+ :environment-name="blob.environmentFormattedExternalUrl"
+ :environment-path="blob.environmentExternalUrlForRouteMap"
+ :is-empty="isEmpty"
@copy="proxyCopyRequest"
/>
</div>