user avatar cleanup

This commit is contained in:
Henry Jameson 2025-08-05 17:17:01 +03:00
commit 99886ac28c
2 changed files with 28 additions and 9 deletions

View file

@ -14,12 +14,31 @@ library.add(
)
const UserAvatar = {
props: [
'user',
'compact',
'showActorTypeIndicator',
'url'
],
props: {
// User object to show avatar of
user: {
required: true,
type: Object
},
// Use less space and use alternative roundness
compact: {
required: false,
type: Boolean,
default: false
},
// Show small icon indicating if account is a bot or group
showActorTypeIndicator : {
required: false,
type: Boolean,
default: false
},
// Override avatar image URL, useful for profile editing
url: {
required: false,
type: String,
default: null
}
},
data () {
return {
showPlaceholder: false,

View file

@ -40,12 +40,12 @@
display: inline-block;
position: relative;
width: 48px;
width: 3.5em;
height: 48px;
&.-compact {
width: 32px;
height: 32px;
width: 2.2em;
height: 2.2em;
border-radius: var(--roundness);
}