diff options
| author | Sean King <seanking2919@protonmail.com> | 2022-08-06 22:02:21 -0600 |
|---|---|---|
| committer | Sean King <seanking2919@protonmail.com> | 2022-08-06 22:02:21 -0600 |
| commit | dc9951d400fc6f4e9080d29589bf186fb081f4f6 (patch) | |
| tree | 06491c209236128adaf47644babd2ade44c490e3 /src/components/user_card/user_card.js | |
| parent | 18d69f93d38dc15a74db81ee4c10b4766bebfc35 (diff) | |
| parent | 610720f164dc9fcf36f9df33bddec5ac9c654e1e (diff) | |
Fix merge conflicts
Diffstat (limited to 'src/components/user_card/user_card.js')
| -rw-r--r-- | src/components/user_card/user_card.js | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 4168c54a..4c81e2c7 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,15 +58,16 @@ 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 () { return { backgroundImage: [ - `linear-gradient(to bottom, var(--profileTint), var(--profileTint))`, + 'linear-gradient(to bottom, var(--profileTint), var(--profileTint))', `url(${this.user.cover_photo})` ].join(', ') } @@ -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() + } } } } |
