Commit b2bd128f authored by Tae Hoon's avatar Tae Hoon

allow zooming avatar in profile panel header

parent 5881d92e
......@@ -5,10 +5,9 @@ import ModerationTools from '../moderation_tools/moderation_tools.vue'
import { hex2rgb } from '../../services/color_convert/color_convert.js'
import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
import { isEqual } from 'lodash'
export default {
props: [ 'user', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered' ],
props: [ 'user', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered', 'allowZoomingAvatar' ],
data () {
return {
followRequestInProgress: false,
......@@ -101,10 +100,6 @@ export default {
const validRole = rights.admin || rights.moderator
const roleTitle = rights.admin ? 'admin' : 'moderator'
return validRole && roleTitle
},
isActiveRoute () {
const profileRoute = this.userProfileLink(this.user)
return profileRoute.name === this.$route.name && isEqual(profileRoute.params, this.$route.params)
}
},
components: {
......@@ -168,7 +163,7 @@ export default {
reportUser () {
this.$store.dispatch('openUserReportingModal', this.user.id)
},
enlargeAvatar () {
zoomAvatar () {
const attachment = {
url: this.user.profile_image_url_original,
mimetype: 'image'
......
......@@ -8,9 +8,9 @@
<div class="user-info">
<div class="container">
<a
v-if="isActiveRoute"
v-if="allowZoomingAvatar"
class="user-info-avatar-link"
@click="enlargeAvatar"
@click="zoomAvatar"
>
<UserAvatar
:better-shadow="betterShadow"
......
......@@ -8,6 +8,7 @@
:user="user"
:switcher="true"
:selected="timeline.viewing"
:allow-zooming-avatar="true"
rounded="top"
/>
<tab-switcher
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment