user avatar cleanup
This commit is contained in:
parent
d4c0ccf659
commit
99886ac28c
2 changed files with 28 additions and 9 deletions
|
|
@ -14,12 +14,31 @@ library.add(
|
||||||
)
|
)
|
||||||
|
|
||||||
const UserAvatar = {
|
const UserAvatar = {
|
||||||
props: [
|
props: {
|
||||||
'user',
|
// User object to show avatar of
|
||||||
'compact',
|
user: {
|
||||||
'showActorTypeIndicator',
|
required: true,
|
||||||
'url'
|
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 () {
|
data () {
|
||||||
return {
|
return {
|
||||||
showPlaceholder: false,
|
showPlaceholder: false,
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,12 @@
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 48px;
|
width: 3.5em;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
|
|
||||||
&.-compact {
|
&.-compact {
|
||||||
width: 32px;
|
width: 2.2em;
|
||||||
height: 32px;
|
height: 2.2em;
|
||||||
border-radius: var(--roundness);
|
border-radius: var(--roundness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue