summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-24 19:29:40 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-24 19:29:40 +0200
commit3dd06813066bf44b4c651662824ff51e1bb0305e (patch)
tree7f86077e954d5298d287862a7b9f675ce7c3cc4e /components
parentcf1c2bc8ed8fe73a1b0907b134863ff407516473 (diff)
Use ui-avatars.com API for avatar generating
Diffstat (limited to 'components')
-rw-r--r--components/UserAvatar.vue5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/UserAvatar.vue b/components/UserAvatar.vue
index e75587b..53ad37d 100644
--- a/components/UserAvatar.vue
+++ b/components/UserAvatar.vue
@@ -4,6 +4,11 @@
:class="{'h-48 w-48': big}"
v-if="data.avatar" :src="baseAPI+''+data.avatar" alt="Avatar"
)
+ img.h-8.w-8.rounded-full(
+ :class="{'h-48 w-48': big}"
+ :src="'https://ui-avatars.com/api/?size='+(big?192:32)+'&name='+(data.name || data.username[0])"
+ v-else
+ )
span.h-8.w-8.rounded-full.bg-gray-100.text-center.pt-1.block(
:class="{'h-48 w-48': big}"
v-else