Merge branch 'feature/follow-notifications' into 'develop'
Add follow notifications. See merge request !92
This commit is contained in:
commit
dbad99cb4f
3 changed files with 20 additions and 0 deletions
|
@ -49,6 +49,10 @@
|
||||||
color: $green;
|
color: $green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-user-plus.lit {
|
||||||
|
color: $blue;
|
||||||
|
}
|
||||||
|
|
||||||
.icon-reply.lit {
|
.icon-reply.lit {
|
||||||
color: $blue;
|
color: $blue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,15 @@
|
||||||
</h1>
|
</h1>
|
||||||
<status :compact="true" :statusoid="notification.status"></status>
|
<status :compact="true" :statusoid="notification.status"></status>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="notification.type === 'follow'">
|
||||||
|
<h1>
|
||||||
|
<span :title="'@'+notification.action.user.screen_name">{{ notification.action.user.name }}</span>
|
||||||
|
<i class="fa icon-user-plus lit"></i>
|
||||||
|
</h1>
|
||||||
|
<div>
|
||||||
|
<router-link :to="{ name: 'user-profile', params: { id: notification.action.user.id } }">@{{ notification.action.user.screen_name }}</router-link> followed you
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -105,6 +105,10 @@ export const statusType = (status) => {
|
||||||
return 'deletion'
|
return 'deletion'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (status.text.match(/started following/)) {
|
||||||
|
return 'follow'
|
||||||
|
}
|
||||||
|
|
||||||
return 'unknown'
|
return 'unknown'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,6 +257,9 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
||||||
favoriteStatus(favorite)
|
favoriteStatus(favorite)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'follow': (status) => {
|
||||||
|
addNotification({ type: 'follow', status: status, action: status })
|
||||||
|
},
|
||||||
'deletion': (deletion) => {
|
'deletion': (deletion) => {
|
||||||
const uri = deletion.uri
|
const uri = deletion.uri
|
||||||
updateMaxId(deletion)
|
updateMaxId(deletion)
|
||||||
|
|
Loading…
Reference in a new issue