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