summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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