diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-10-28 15:40:13 +0200 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-10-28 15:40:13 +0200 |
| commit | eab256a7e5ed540f07be3018f9ae593fc6d2d880 (patch) | |
| tree | 6e4548978c89e575cdb384bb5b5d26eaa673fcbe /src/components/timeline | |
| parent | 534f2e8195523ffae83ed85f4e9fddf2939929e3 (diff) | |
New status showing.
Diffstat (limited to 'src/components/timeline')
| -rw-r--r-- | src/components/timeline/timeline.js | 8 | ||||
| -rw-r--r-- | src/components/timeline/timeline.vue | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index fd36d0db..433bca11 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -2,10 +2,16 @@ import Status from '../status/status.vue' const Timeline = { props: [ - 'timeline' + 'timeline', + 'timelineName' ], components: { Status + }, + methods: { + showNewStatuses () { + this.$store.commit('showNewStatuses', { timeline: this.timelineName }) + } } } diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 562656f6..216982f6 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -1,5 +1,12 @@ <template> <div class="timeline"> + <a href="#" v-on:click.prevent='showNewStatuses()' v-if="timeline.newStatusCount > 0"> + <div class="new-status-notification"> + <p class="text-center" > + {{timeline.newStatusCount}} new statuses + </p> + </div> + </a> <status v-for="status in timeline.visibleStatuses" v-bind:status="status"></status> </div> </template> |
