fix(avatar): update default bg color (#214)

zio/stable
Chris 2022-11-29 14:00:06 +08:00 committed by GitHub
parent db47e31597
commit 08fe00df6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,8 @@ import type { Account } from 'masto'
defineProps<{ defineProps<{
account: Account account: Account
}>() }>()
const loaded = $ref(false)
</script> </script>
<template> <template>
@ -12,7 +14,9 @@ defineProps<{
:src="account.avatar" :src="account.avatar"
:alt="account.username" :alt="account.username"
loading="lazy" loading="lazy"
rounded-full bg-gray:10 rounded-full
:class="loaded ? 'bg-gray' : 'bg-gray:10'"
v-bind="$attrs" v-bind="$attrs"
@load="loaded = true"
> >
</template> </template>

View File

@ -80,7 +80,7 @@ watchEffect(() => {
<div p4 mt--17 flex flex-col gap-4> <div p4 mt--17 flex flex-col gap-4>
<div relative> <div relative>
<div flex="~ col gap-2 1"> <div flex="~ col gap-2 1">
<button w-30 h-30 rounded-full bg-gray border-4 border-bg-base z-2 @click="previewAvatar"> <button w-30 h-30 rounded-full border-4 border-bg-base z-2 @click="previewAvatar">
<AccountAvatar :account="account" hover:opacity-90 transition-opacity /> <AccountAvatar :account="account" hover:opacity-90 transition-opacity />
</button> </button>
<div flex flex-col> <div flex flex-col>