From 12fb25c3f339f2ec45b12cb221670a3f167d32c1 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Sat, 24 Sep 2022 18:53:07 +0200
Subject: Handle bigger avatars

---
 components/UserAvatar.vue | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'components/UserAvatar.vue')

diff --git a/components/UserAvatar.vue b/components/UserAvatar.vue
index 103455c..e75587b 100644
--- a/components/UserAvatar.vue
+++ b/components/UserAvatar.vue
@@ -1,13 +1,19 @@
 <template lang="pug">
   div(v-if="data")
-    img.h-8.w-8.rounded-full(v-if="data.avatar" :src="baseAPI+''+data.avatar" alt="Avatar")
-    span.h-8.w-8.rounded-full.bg-gray-100.text-center.pt-1.block(v-else) {{ data.username[0] }}
+    img.h-8.w-8.rounded-full(
+      :class="{'h-48 w-48': big}"
+      v-if="data.avatar" :src="baseAPI+''+data.avatar" alt="Avatar"
+    )
+    span.h-8.w-8.rounded-full.bg-gray-100.text-center.pt-1.block(
+      :class="{'h-48 w-48': big}"
+      v-else
+    ) {{ data.username[0] }}
 </template>
 
 <script>
 export default {
   name: "UserAvatar",
-  props: ["data"],
+  props: ["data", "big"],
   data() {
     return {
       baseAPI: "",
-- 
cgit v1.2.3-71-g8e6c

