Commit 682df5c5 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Replace v-show with v-if to conform style guide

parent b2f18828
...@@ -84,9 +84,6 @@ export default { ...@@ -84,9 +84,6 @@ export default {
return fullPath; return fullPath;
}, },
hasGroups() {
return Object.keys(this.group.subGroups).length > 0;
},
}, },
}; };
</script> </script>
...@@ -99,7 +96,7 @@ export default { ...@@ -99,7 +96,7 @@ export default {
> >
<div class="controls"> <div class="controls">
<a <a
v-show="group.canEdit" v-if="group.canEdit"
class="edit-group btn" class="edit-group btn"
:href="group.editPath"> :href="group.editPath">
<i aria-hidden="true" class="fa fa-cogs"></i> <i aria-hidden="true" class="fa fa-cogs"></i>
...@@ -127,22 +124,22 @@ export default { ...@@ -127,22 +124,22 @@ export default {
</div> </div>
<div class="folder-toggle-wrap"> <div class="folder-toggle-wrap">
<span class="folder-caret"> <span class="folder-caret" v-if="group.hasSubgroups">
<i <i
v-show="group.isOpen" v-if="group.isOpen"
class="fa fa-caret-down" /> class="fa fa-caret-down" />
<i <i
v-show="!group.isOpen" v-if="!group.isOpen"
class="fa fa-caret-right" /> class="fa fa-caret-right" />
</span> </span>
<span class="folder-icon"> <span class="folder-icon">
<i <i
v-show="group.isOpen" v-if="group.isOpen"
class="fa fa-folder-open" class="fa fa-folder-open"
aria-hidden="true"></i> aria-hidden="true"></i>
<i <i
v-show="!group.isOpen" v-if="!group.isOpen"
class="fa fa-folder"></i> class="fa fa-folder"></i>
</span> </span>
</div> </div>
...@@ -161,6 +158,6 @@ export default { ...@@ -161,6 +158,6 @@ export default {
{{group.description}} {{group.description}}
</div> </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> </li>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment