mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-09 10:13:42 +00:00
allow zooming avatar in profile panel header
This commit is contained in:
parent
5881d92eb7
commit
b2bd128f05
3 changed files with 5 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue