summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-05-31 16:37:30 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2017-05-31 16:37:30 -0500
commit682df5c57b8f7f81b3b4ded69a70ea249962a429 (patch)
tree5d3dc2f17597c7f9d3155ef40ed4e4a6e21a322d /app
parentb2f18828c394265acd8359b4a3ffa9d7a24be4df (diff)
downloadgitlab-ce-682df5c57b8f7f81b3b4ded69a70ea249962a429.tar.gz
Replace v-show with v-if to conform style guide
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/groups/components/group_item.vue17
1 files changed, 7 insertions, 10 deletions
diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue
index 08cf628e71f..3c92d6fd1eb 100644
--- a/app/assets/javascripts/groups/components/group_item.vue
+++ b/app/assets/javascripts/groups/components/group_item.vue
@@ -84,9 +84,6 @@ export default {
return fullPath;
},
- hasGroups() {
- return Object.keys(this.group.subGroups).length > 0;
- },
},
};
</script>
@@ -99,7 +96,7 @@ export default {
>
<div class="controls">
<a
- v-show="group.canEdit"
+ v-if="group.canEdit"
class="edit-group btn"
:href="group.editPath">
<i aria-hidden="true" class="fa fa-cogs"></i>
@@ -127,22 +124,22 @@ export default {
</div>
<div class="folder-toggle-wrap">
- <span class="folder-caret">
+ <span class="folder-caret" v-if="group.hasSubgroups">
<i
- v-show="group.isOpen"
+ v-if="group.isOpen"
class="fa fa-caret-down" />
<i
- v-show="!group.isOpen"
+ v-if="!group.isOpen"
class="fa fa-caret-right" />
</span>
<span class="folder-icon">
<i
- v-show="group.isOpen"
+ v-if="group.isOpen"
class="fa fa-folder-open"
aria-hidden="true"></i>
<i
- v-show="!group.isOpen"
+ v-if="!group.isOpen"
class="fa fa-folder"></i>
</span>
</div>
@@ -161,6 +158,6 @@ export default {
{{group.description}}
</div>
- <group-folder v-if="group.isOpen && hasGroups" :groups="group.subGroups" :baseGroup="group" />
+ <group-folder v-if="group.isOpen && group.hasSubgroups" :groups="group.subGroups" :baseGroup="group" />
</li>
</template>