Merge remote-tracking branch 'Dave/issue-436-mastoapi-notifications' into shigusegubu
* Dave/issue-436-mastoapi-notifications: #436 - sync notification & timeline users
This commit is contained in:
commit
e990090bbf
2 changed files with 11 additions and 6 deletions
|
@ -33,13 +33,13 @@ const Notification = {
|
||||||
return highlightStyle(highlight[user.screen_name])
|
return highlightStyle(highlight[user.screen_name])
|
||||||
},
|
},
|
||||||
userInStore () {
|
userInStore () {
|
||||||
return this.$store.getters.findUser(this.notification.action.user.id)
|
return this.$store.getters.findUser(this.notification.from_profile.id)
|
||||||
},
|
},
|
||||||
user () {
|
user () {
|
||||||
if (this.userInStore) {
|
if (this.userInStore) {
|
||||||
return this.userInStore
|
return this.userInStore
|
||||||
}
|
}
|
||||||
return {}
|
return this.notification.from_profile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<status v-if="notification.type === 'mention'" :compact="true" :statusoid="notification.status"></status>
|
<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">
|
<a class='avatar-container' :href="notification.from_profile.statusnet_profile_url" @click.stop.prevent.capture="toggleUserExpanded">
|
||||||
<UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.action.user.profile_image_url_original"/>
|
<UserAvatar :compact="true" :betterShadow="betterShadow" :src="notification.from_profile.profile_image_url_original" />
|
||||||
</a>
|
</a>
|
||||||
<div class='notification-right'>
|
<div class='notification-right'>
|
||||||
<UserCard :user="user" :rounded="true" :bordered="true" v-if="userExpanded"/>
|
<UserCard :user="user" :rounded="true" :bordered="true" v-if="userExpanded" />
|
||||||
<span class="notification-details">
|
<span class="notification-details">
|
||||||
<div class="name-and-action">
|
<div class="name-and-action">
|
||||||
<span class="username" v-if="!!notification.from_profile.name_html" :title="'@'+notification.from_profile.screen_name" v-html="notification.from_profile.name_html"></span>
|
<span class="username" v-if="!!notification.from_profile.name_html" :title="'@'+notification.from_profile.screen_name" v-html="notification.from_profile.name_html"></span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue