Skip to content

Commit

Permalink
feat: add ability to set tool-avatar-select size
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Jun 23, 2024
1 parent 8d0e6f6 commit ce6eb45
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/popups/sidebar/EditProfileNavigate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@update="onAvatarUpdate"
:jid="jid"
:pending="pending"
size="96px"
)

p.p-edit-profile-navigate__identity-name.u-medium
Expand Down
24 changes: 22 additions & 2 deletions src/components/tool/ToolAvatarSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ div(
:class=`[
"c-tool-avatar-select",
{
"c-tool-avatar-select--locked": pending || fileLoading
"c-tool-avatar-select--locked": pending || fileLoading,
"c-tool-avatar-select--block": block
}
]`
:style=`{
width: size,
height: size
}`
)
base-avatar(
:jid="jid"
:data-url="avatarDataUrl"
size="96px"
:size="size"
shadow="light"
class="c-tool-avatar-select__image"
square
Expand Down Expand Up @@ -84,9 +89,19 @@ export default {
required: true
},

size: {
type: String,
default: "100px"
},

pending: {
type: Boolean,
default: false
},

block: {
type: Boolean,
default: false
}
},

Expand Down Expand Up @@ -290,5 +305,10 @@ $c: ".c-tool-avatar-select";
&--locked {
pointer-events: none;
}

&--block {
margin-inline: auto;
display: block;
}
}
</style>

0 comments on commit ce6eb45

Please sign in to comment.