summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-06-15 13:12:59 +0100
committerPhil Hughes <me@iamphill.com>2018-06-15 13:12:59 +0100
commit38db5f0706f428c77e1967932b70b638921e6006 (patch)
tree80c2dc1fea14841f39018e4cc6aea5436a07766d
parent7483872416b7bf3c44dcb855ae8f1b9675496509 (diff)
downloadgitlab-ce-ide-commit-actions-update.tar.gz
added computed prop for file list lengthide-commit-actions-update
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/list.vue13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list.vue b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
index 175ab92b8e1..d0fb0e3d99e 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/list.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
@@ -63,6 +63,9 @@ export default {
title: this.title,
});
},
+ filesLength() {
+ return this.fileList.length;
+ },
},
methods: {
...mapActions(['stageAllChanges', 'unstageAllChanges']),
@@ -92,9 +95,9 @@ export default {
<div class="d-flex ml-auto">
<button
v-tooltip
- v-show="fileList.length"
+ v-show="filesLength"
:class="{
- 'd-flex': fileList.length
+ 'd-flex': filesLength
}"
:title="actionBtnText"
type="button"
@@ -112,17 +115,17 @@ export default {
</button>
<span
:class="{
- 'rounded-right': !fileList.length
+ 'rounded-right': !filesLength
}"
class="ide-commit-file-count order-0 rounded-left text-center"
>
- {{ fileList.length }}
+ {{ filesLength }}
</span>
</div>
</div>
</header>
<ul
- v-if="fileList.length"
+ v-if="filesLength"
class="multi-file-commit-list list-unstyled append-bottom-0"
>
<li