diff options
author | kushalpandya <kushal@gitlab.com> | 2017-07-31 13:34:25 +0300 |
---|---|---|
committer | kushalpandya <kushal@gitlab.com> | 2017-07-31 13:34:25 +0300 |
commit | 84568997431d778644d41dd3e3a4f98eee850935 (patch) | |
tree | 134c701935f85166a74ff978b6b16800e93e8bdd /app/assets/javascripts/groups/components/group_item.vue | |
parent | b535be35ae8bbb003f550e51d22a8e3b4c46b07c (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.vue | 13 |
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 |