diff options
| author | wakarimasen <wakarimasen@airmail.cc> | 2017-03-09 13:38:32 +0100 |
|---|---|---|
| committer | wakarimasen <wakarimasen@airmail.cc> | 2017-03-09 13:38:32 +0100 |
| commit | e064d2da4de67ad42268f8eea0efd20646b3cb16 (patch) | |
| tree | 7d99cda63bbfa0ee88867ebc431c2ea91f14e273 /src/components | |
| parent | 64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff) | |
Use one error variable for all timelines
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/timeline/timeline.js | 3 | ||||
| -rw-r--r-- | src/components/timeline/timeline.vue | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index b4e80fe1..d5a9adcc 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -8,6 +8,9 @@ const Timeline = { 'timelineName', 'title' ], + computed: { + timelineError () { return this.$store.state.statuses.error } + }, components: { Status, StatusOrConversation diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index ac074f3c..b1ff327b 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -4,13 +4,13 @@ <div class="title"> {{title}} </div> - <button @click.prevent="showNewStatuses" class="base06 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timeline.error"> + <button @click.prevent="showNewStatuses" class="base06 base02-background loadmore-button" v-if="timeline.newStatusCount > 0 && !timelineError"> Show new ({{timeline.newStatusCount}}) </button> - <button @click.prevent class="base06 error no-press loadmore-button" v-if="timeline.error"> + <button @click.prevent class="base06 error no-press loadmore-button" v-if="timelineError"> Error fetching updates </button> - <button @click.prevent class="base04 base01-background no-press loadmore-button" v-if="!timeline.newStatusCount > 0 && !timeline.error"> + <button @click.prevent class="base04 base01-background no-press loadmore-button" v-if="!timeline.newStatusCount > 0 && !timelineError"> Up-to-date </button> </div> |
