aboutsummaryrefslogtreecommitdiff
path: root/src/components/notifications/notifications.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/notifications/notifications.js')
-rw-r--r--src/components/notifications/notifications.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js
new file mode 100644
index 00000000..10f987a8
--- /dev/null
+++ b/src/components/notifications/notifications.js
@@ -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