mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #2472 from Human-Connection/quickfix_for_nullpointer_error_in_user_vue
Quick fix for null pointer error in User.vue
This commit is contained in:
commit
4293fb845b
@ -8,7 +8,7 @@
|
||||
<dropdown v-else :class="{ 'disabled-content': user.disabled }" placement="top-start" offset="0">
|
||||
<template slot="default" slot-scope="{ openMenu, closeMenu, isOpen }">
|
||||
<nuxt-link :to="userLink" :class="['user', isOpen && 'active']">
|
||||
<div @mouseover="openInfoMenu" @mouseleave="closeMenu(true)">
|
||||
<div @mouseover="showPopover ? openMenu(true) : () => {}" @mouseleave="closeMenu(true)">
|
||||
<hc-avatar v-if="showAvatar" class="avatar" :user="user" />
|
||||
<div>
|
||||
<ds-text class="userinfo">
|
||||
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</template>
|
||||
<template slot="popover" v-if="showCounts">
|
||||
<template slot="popover" v-if="showPopover">
|
||||
<div style="min-width: 250px">
|
||||
<hc-badges v-if="user.badges && user.badges.length" :badges="user.badges" />
|
||||
<ds-text
|
||||
@ -106,7 +106,7 @@ export default {
|
||||
showAvatar: { type: Boolean, default: true },
|
||||
trunc: { type: Number, default: 18 }, // "-1" is no trunc
|
||||
dateTime: { type: [Date, String], default: null },
|
||||
showCounts: { type: Boolean, default: true },
|
||||
showPopover: { type: Boolean, default: true },
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
@ -143,9 +143,6 @@ export default {
|
||||
this.user.followedByCount = followedByCount
|
||||
this.user.followedByCurrentUser = followedByCurrentUser
|
||||
},
|
||||
openInfoMenu() {
|
||||
if (this.showCounts) this.openMenu(true)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
<hc-user
|
||||
:user="scope.row.submitter"
|
||||
:showAvatar="false"
|
||||
:showPopover="false"
|
||||
:trunc="30"
|
||||
data-test="filing-user"
|
||||
/>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<!-- Content Column -->
|
||||
<td class="ds-table-col" data-test="report-content">
|
||||
<client-only v-if="isUser">
|
||||
<hc-user :user="report.resource" :showAvatar="false" :trunc="30" :showCounts="false" />
|
||||
<hc-user :user="report.resource" :showAvatar="false" :trunc="30" :showPopover="false" />
|
||||
</client-only>
|
||||
<nuxt-link v-else class="title" :to="linkTarget">
|
||||
{{ linkText | truncate(50) }}
|
||||
@ -33,7 +33,7 @@
|
||||
:user="report.resource.author"
|
||||
:showAvatar="false"
|
||||
:trunc="30"
|
||||
:showCounts="false"
|
||||
:showPopover="false"
|
||||
/>
|
||||
</client-only>
|
||||
<span v-else>—</span>
|
||||
@ -51,7 +51,7 @@
|
||||
:showAvatar="false"
|
||||
:trunc="30"
|
||||
:date-time="report.updatedAt"
|
||||
:showCounts="false"
|
||||
:showPopover="false"
|
||||
/>
|
||||
</client-only>
|
||||
</td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user