diff options
| author | Weblate <noreply@weblate.org> | 2022-07-31 23:00:53 +0000 |
|---|---|---|
| committer | Weblate <noreply@weblate.org> | 2022-07-31 23:00:53 +0000 |
| commit | 71d9bbb56bf0927ce29e926e6e717c5ac8304f20 (patch) | |
| tree | 9093fda29c7b5f27cd74d38aba42f40ca0966daf /src/components/user_card/user_card.js | |
| parent | e0aeab04b8c1c296d2e16943f7333e05f5b2450b (diff) | |
| parent | 33ad712852088f8b99a82ec561733d41d63b0034 (diff) | |
Merge remote-tracking branch 'origin/develop' into develop
Diffstat (limited to 'src/components/user_card/user_card.js')
| -rw-r--r-- | src/components/user_card/user_card.js | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 4168c54a..b0fa11b3 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -14,7 +14,9 @@ import { faRss, faSearchPlus, faExternalLinkAlt, - faEdit + faEdit, + faTimes, + faExpandAlt } from '@fortawesome/free-solid-svg-icons' library.add( @@ -22,12 +24,21 @@ library.add( faBell, faSearchPlus, faExternalLinkAlt, - faEdit + faEdit, + faTimes, + faExpandAlt ) export default { props: [ - 'userId', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered', 'allowZoomingAvatar' + 'userId', + 'switcher', + 'selected', + 'hideBio', + 'rounded', + 'bordered', + 'avatarAction', // default - open profile, 'zoom' - zoom, function - call function + 'onClose' ], data () { return { @@ -47,9 +58,10 @@ export default { }, classes () { return [{ - 'user-card-rounded-t': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius - 'user-card-rounded': this.rounded === true, // set border-radius for all sides - 'user-card-bordered': this.bordered === true // set border for all sides + '-rounded-t': this.rounded === 'top', // set border-top-left-radius and border-top-right-radius + '-rounded': this.rounded === true, // set border-radius for all sides + '-bordered': this.bordered === true, // set border for all sides + '-popover': !!this.onClose // set popover rounding }] }, style () { @@ -170,6 +182,12 @@ export default { }, mentionUser () { this.$store.dispatch('openPostStatusModal', { replyTo: true, repliedUser: this.user }) + }, + onAvatarClickHandler (e) { + if (this.onAvatarClick) { + e.preventDefault() + this.onAvatarClick() + } } } } |
