close on avatar click again, add zooming as option
This commit is contained in:
parent
700df11e9a
commit
d232fa3dc3
|
@ -74,6 +74,11 @@
|
|||
{{ $t('settings.show_scrollbars') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting path="userPopoverZoom">
|
||||
{{ $t('settings.user_popover_avatar_zoom') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<ChoiceSetting
|
||||
v-if="user"
|
||||
|
|
|
@ -38,7 +38,8 @@ export default {
|
|||
'rounded',
|
||||
'bordered',
|
||||
'allowZoomingAvatar',
|
||||
'onClose'
|
||||
'onClose',
|
||||
'onAvatarClick'
|
||||
],
|
||||
data () {
|
||||
return {
|
||||
|
@ -182,6 +183,12 @@ export default {
|
|||
},
|
||||
mentionUser () {
|
||||
this.$store.dispatch('openPostStatusModal', { replyTo: true, repliedUser: this.user })
|
||||
},
|
||||
onAvatarClickHandler (e) {
|
||||
if (this.onAvatarClick) {
|
||||
e.preventDefault()
|
||||
this.onAvatarClick()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<router-link
|
||||
v-else
|
||||
:to="userProfileLink(user)"
|
||||
@click="onAvatarClickHandler"
|
||||
>
|
||||
<UserAvatar
|
||||
:better-shadow="betterShadow"
|
||||
|
|
|
@ -4,11 +4,16 @@ import { defineAsyncComponent } from 'vue'
|
|||
const UserPopover = {
|
||||
name: 'UserPopover',
|
||||
props: [
|
||||
'userId', 'overlayCenters', 'disabled', 'overlay-centers-selector'
|
||||
'userId', 'overlayCenters', 'disabled', 'overlayCentersSelector'
|
||||
],
|
||||
components: {
|
||||
UserCard,
|
||||
Popover: defineAsyncComponent(() => import('../popover/popover.vue'))
|
||||
},
|
||||
computed: {
|
||||
userPopoverZoom () {
|
||||
return this.$store.getters.mergedConfig.userPopoverZoom
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Popover
|
||||
trigger="click"
|
||||
popover-class="popover-default user-popover"
|
||||
:overlay-centers-selector="overlayCentersSelector || '.user-info-avatar-link .Avatar'"
|
||||
:overlay-centers-selector="overlayCentersSelector || '.user-info .Avatar'"
|
||||
:overlay-centers="overlayCenters"
|
||||
:disabled="disabled"
|
||||
>
|
||||
|
@ -14,8 +14,9 @@
|
|||
class="user-popover"
|
||||
:user-id="userId"
|
||||
:hide-bio="true"
|
||||
:allow-zooming-avatar="true"
|
||||
:onClose="close"
|
||||
:allow-zooming-avatar="userPopoverZoom"
|
||||
:on-avatar-click="userPopoverZoom ? null : close"
|
||||
:on-close="close"
|
||||
/>
|
||||
</template>
|
||||
</Popover>
|
||||
|
|
|
@ -550,6 +550,7 @@
|
|||
"mention_link_show_avatar": "Show user avatar beside the link",
|
||||
"mention_link_fade_domain": "Fade domains (e.g. {'@'}example.org in {'@'}foo{'@'}example.org)",
|
||||
"mention_link_bolden_you": "Highlight mention of you when you are mentioned",
|
||||
"user_popover_avatar_zoom": "Clicking on user avatar in popover zooms it instead of closing the popover",
|
||||
"fun": "Fun",
|
||||
"greentext": "Meme arrows",
|
||||
"show_yous": "Show (You)s",
|
||||
|
|
|
@ -81,6 +81,7 @@ export const defaultState = {
|
|||
useContainFit: true,
|
||||
disableStickyHeaders: false,
|
||||
showScrollbars: false,
|
||||
userPopoverZoom: false,
|
||||
greentext: undefined, // instance default
|
||||
useAtIcon: undefined, // instance default
|
||||
mentionLinkDisplay: undefined, // instance default
|
||||
|
|
Loading…
Reference in New Issue