From a35884c0a7bea73eb97d0db21a602fa57d487d7f Mon Sep 17 00:00:00 2001 From: wheat Date: Thu, 5 Jan 2023 17:21:31 -0500 Subject: [PATCH] feat: update design of square avatar (#808) --- app.vue | 9 +++++++++ components/account/AccountAvatar.vue | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app.vue b/app.vue index 1022586e..31cc43a1 100644 --- a/app.vue +++ b/app.vue @@ -12,4 +12,13 @@ const key = computed(() => `${currentUser.value?.server ?? currentServer.value}: + + + + + + + + + diff --git a/components/account/AccountAvatar.vue b/components/account/AccountAvatar.vue index cce85f9b..e12e658e 100644 --- a/components/account/AccountAvatar.vue +++ b/components/account/AccountAvatar.vue @@ -18,7 +18,8 @@ const error = $ref(false) :src="error ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar" :alt="$t('account.avatar_description', [account.username])" loading="lazy" - :class="(loaded ? 'bg-base' : 'bg-gray:10') + (square ? ' rounded-3' : ' rounded-full')" + :class="(loaded ? 'bg-base' : 'bg-gray:10') + (square ? ' ' : ' rounded-full')" + :style="{ 'clip-path': square ? `url(#avatar-mask)` : 'none' }" v-bind="$attrs" @load="loaded = true" @error="error = true"