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:
authorkushalpandya <kushal@gitlab.com>2017-07-31 13:34:25 +0300
committerkushalpandya <kushal@gitlab.com>2017-07-31 13:34:25 +0300
commit84568997431d778644d41dd3e3a4f98eee850935 (patch)
tree134c701935f85166a74ff978b6b16800e93e8bdd /app/assets/javascripts/groups/components/group_item.vue
parentb535be35ae8bbb003f550e51d22a8e3b4c46b07c (diff)
Use GroupIdenticon for missing avatars
Diffstat (limited to 'app/assets/javascripts/groups/components/group_item.vue')
-rw-r--r--app/assets/javascripts/groups/components/group_item.vue13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue
index b1db34b9c50..c704aa65df2 100644
--- a/app/assets/javascripts/groups/components/group_item.vue
+++ b/app/assets/javascripts/groups/components/group_item.vue
@@ -92,6 +92,13 @@ export default {
hasGroups() {
return Object.keys(this.group.subGroups).length > 0;
},
+ hasAvatar() {
+ if (this.group.avatarUrl) {
+ return this.group.avatarUrl.indexOf('/assets/no_group_avatar') === -1;
+ } else {
+ return false;
+ }
+ },
},
};
</script>
@@ -194,9 +201,15 @@ export default {
<a
:href="group.groupPath">
<img
+ v-if="hasAvatar"
class="avatar s40"
:src="group.avatarUrl"
/>
+ <group-identicon
+ v-else
+ :id=group.id
+ :name="group.name"
+ />
</a>
</div>
<div