aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2019-04-01 15:38:14 +0000
committerShpuld Shpludson <shp@cock.li>2019-04-01 15:38:14 +0000
commit6c24ae9b0be25becc453cd62ba78b955c5fb6c70 (patch)
tree1eeebe0380b1a4526c1ccd2e67f4adc3ba6932bd /src
parent0117f6af9f8ae600e613402590de4c9364806967 (diff)
parent80277e5571bbe72d341dc17e7b418e6bdaa25029 (diff)
Merge branch 'fix/user-card-buttons' into 'develop'
#467 Fix/Muted and Blocked not "pressed" on User Card Closes #467 See merge request pleroma/pleroma-fe!720
Diffstat (limited to 'src')
-rw-r--r--src/components/notification/notification.js9
-rw-r--r--src/components/notification/notification.vue4
-rw-r--r--src/components/user_profile/user_profile.js3
3 files changed, 11 insertions, 5 deletions
diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js
index fe5b7018..42a48f3f 100644
--- a/src/components/notification/notification.js
+++ b/src/components/notification/notification.js
@@ -31,6 +31,15 @@ const Notification = {
const highlight = this.$store.state.config.highlight
const user = this.notification.action.user
return highlightStyle(highlight[user.screen_name])
+ },
+ userInStore () {
+ return this.$store.getters.findUser(this.notification.action.user.id)
+ },
+ user () {
+ if (this.userInStore) {
+ return this.userInStore
+ }
+ return {}
}
}
}
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 5e9cef97..8f532747 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -1,11 +1,11 @@
<template>
<status v-if="notification.type === 'mention'" :compact="true" :statusoid="notification.status"></status>
- <div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]"v-else>
+ <div class="non-mention" :class="[userClass, { highlighted: userStyle }]" :style="[ userStyle ]" v-else>
<a class='avatar-container' :href="notification.action.user.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
<UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.action.user.profile_image_url_original"/>
</a>
<div class='notification-right'>
- <UserCard :user="notification.action.user" :rounded="true" :bordered="true" v-if="userExpanded"/>
+ <UserCard :user="user" :rounded="true" :bordered="true" v-if="userExpanded"/>
<span class="notification-details">
<div class="name-and-action">
<span class="username" v-if="!!notification.action.user.name_html" :title="'@'+notification.action.user.screen_name" v-html="notification.action.user.name_html"></span>
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 82df4510..1df06fe6 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -72,9 +72,6 @@ const UserProfile = {
return this.$store.getters.findUser(this.fetchedUserId || routeParams.name || routeParams.id)
},
user () {
- if (this.timeline.statuses[0]) {
- return this.timeline.statuses[0].user
- }
if (this.userInStore) {
return this.userInStore
}