aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_popover
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-06-27 19:52:40 +0300
committerHenry Jameson <me@hjkos.com>2022-06-27 19:52:40 +0300
commitd232fa3dc3ff83a09a4ad583a123b419f4d4fa42 (patch)
treea6e6a861d0e06ead7b28de6d702f13a9af54607f /src/components/user_popover
parent700df11e9a0d36b3e1afdc50034567014c2b71cc (diff)
close on avatar click again, add zooming as option
Diffstat (limited to 'src/components/user_popover')
-rw-r--r--src/components/user_popover/user_popover.js7
-rw-r--r--src/components/user_popover/user_popover.vue7
2 files changed, 10 insertions, 4 deletions
diff --git a/src/components/user_popover/user_popover.js b/src/components/user_popover/user_popover.js
index 3b3722ce..fa7f9781 100644
--- a/src/components/user_popover/user_popover.js
+++ b/src/components/user_popover/user_popover.js
@@ -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
+ }
}
}
diff --git a/src/components/user_popover/user_popover.vue b/src/components/user_popover/user_popover.vue
index f4f505ae..c14cea4d 100644
--- a/src/components/user_popover/user_popover.vue
+++ b/src/components/user_popover/user_popover.vue
@@ -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>