From 3dd06813066bf44b4c651662824ff51e1bb0305e Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 24 Sep 2022 19:29:40 +0200 Subject: Use ui-avatars.com API for avatar generating --- components/UserAvatar.vue | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'components') 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 -- cgit v1.2.3-18-g5258