Add basic notification support.
This commit is contained in:
parent
e1c5030311
commit
e8c85434b7
5 changed files with 85 additions and 3 deletions
16
src/components/notifications/notifications.js
Normal file
16
src/components/notifications/notifications.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { sortBy, take } from 'lodash'
|
||||
|
||||
const Notifications = {
|
||||
data () {
|
||||
return {
|
||||
visibleNotificationCount: 20
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
visibleNotifications () {
|
||||
return take(sortBy(this.$store.state.statuses.notifications, ({action}) => -action.id), this.visibleNotificationCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Notifications
|
Loading…
Add table
Add a link
Reference in a new issue