diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/assets/javascripts/vue_shared/components/file_row.vue | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/file_row.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/file_row.vue | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/components/file_row.vue b/app/assets/javascripts/vue_shared/components/file_row.vue index c1c4f437dee..b4115b0c6a4 100644 --- a/app/assets/javascripts/vue_shared/components/file_row.vue +++ b/app/assets/javascripts/vue_shared/components/file_row.vue @@ -1,4 +1,5 @@ <script> +import { GlTruncate } from '@gitlab/ui'; import FileHeader from '~/vue_shared/components/file_row_header.vue'; import FileIcon from '~/vue_shared/components/file_icon.vue'; import { escapeFileUrl } from '~/lib/utils/url_utility'; @@ -8,6 +9,7 @@ export default { components: { FileHeader, FileIcon, + GlTruncate, }, props: { file: { @@ -28,6 +30,11 @@ export default { required: false, default: '', }, + truncateMiddle: { + type: Boolean, + required: false, + default: false, + }, }, computed: { isTree() { @@ -134,9 +141,9 @@ export default { <span ref="textOutput" :style="levelIndentation" - class="file-row-name str-truncated" + class="file-row-name" data-qa-selector="file_name_content" - :class="fileClasses" + :class="[fileClasses, { 'str-truncated': !truncateMiddle, 'gl-min-w-0': truncateMiddle }]" > <file-icon class="file-row-icon" @@ -146,8 +153,10 @@ export default { :folder="isTree" :opened="file.opened" :size="16" + :submodule="file.submodule" /> - {{ file.name }} + <gl-truncate v-if="truncateMiddle" :text="file.name" position="middle" class="gl-pr-7" /> + <template v-else>{{ file.name }}</template> </span> <slot></slot> </div> |