aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/friends_timeline/friends_timeline.vue2
-rw-r--r--src/components/public_timeline/public_timeline.vue2
-rw-r--r--src/components/timeline/timeline.js8
-rw-r--r--src/components/timeline/timeline.vue7
4 files changed, 16 insertions, 3 deletions
diff --git a/src/components/friends_timeline/friends_timeline.vue b/src/components/friends_timeline/friends_timeline.vue
index 03e518c6..af8ba5fe 100644
--- a/src/components/friends_timeline/friends_timeline.vue
+++ b/src/components/friends_timeline/friends_timeline.vue
@@ -2,7 +2,7 @@
<div class="timeline panel panel-default">
<div class="panel-heading">Friends Timeline</div>
<div class="panel-body">
- <Timeline v-bind:timeline="timeline" />
+ <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'friends'"/>
</div>
</div>
</template>
diff --git a/src/components/public_timeline/public_timeline.vue b/src/components/public_timeline/public_timeline.vue
index 4aab0943..22a2a2b8 100644
--- a/src/components/public_timeline/public_timeline.vue
+++ b/src/components/public_timeline/public_timeline.vue
@@ -2,7 +2,7 @@
<div class="timeline panel panel-default">
<div class="panel-heading">Public Timeline</div>
<div class="panel-body">
- <Timeline v-bind:timeline="timeline" />
+ <Timeline v-bind:timeline="timeline" v-bind:timeline-name="'public'"/>
</div>
</div>
</template>
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>