summaryrefslogtreecommitdiff
path: root/components/UserAvatar.vue
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-24 18:53:07 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-24 18:53:07 +0200
commit12fb25c3f339f2ec45b12cb221670a3f167d32c1 (patch)
tree990a5ad5ac5d55b5aa0dd504381e706c92d94385 /components/UserAvatar.vue
parentbcb253107cb97bb8051eb109b4f557e9f7093a5c (diff)
Handle bigger avatars
Diffstat (limited to 'components/UserAvatar.vue')
-rw-r--r--components/UserAvatar.vue12
1 files changed, 9 insertions, 3 deletions
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: "",