From 9abfcb34efcd1796b7093cf593a4ab65db65e893 Mon Sep 17 00:00:00 2001 From: eal Date: Sun, 17 Sep 2017 14:26:35 +0300 Subject: Add tag timeline view. --- src/components/tag_timeline/tag_timeline.js | 26 ++++++++++++++++++++++++++ src/components/tag_timeline/tag_timeline.js~ | 12 ++++++++++++ src/components/tag_timeline/tag_timeline.vue | 5 +++++ src/components/tag_timeline/tag_timeline.vue~ | 5 +++++ src/components/timeline/timeline.js | 9 ++++++--- 5 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 src/components/tag_timeline/tag_timeline.js create mode 100644 src/components/tag_timeline/tag_timeline.js~ create mode 100644 src/components/tag_timeline/tag_timeline.vue create mode 100644 src/components/tag_timeline/tag_timeline.vue~ (limited to 'src/components') diff --git a/src/components/tag_timeline/tag_timeline.js b/src/components/tag_timeline/tag_timeline.js new file mode 100644 index 00000000..43de4f49 --- /dev/null +++ b/src/components/tag_timeline/tag_timeline.js @@ -0,0 +1,26 @@ +import Timeline from '../timeline/timeline.vue' + +const TagTimeline = { + created () { + this.$store.commit('clearTimeline', { timeline: 'tag' }) + this.$store.dispatch('startFetching', { 'tag': this.tag }) + }, + components: { + Timeline + }, + computed: { + tag () { return this.$route.params.tag }, + timeline () { return this.$store.state.statuses.timelines.tag } + }, + watch: { + tag () { + this.$store.commit('clearTimeline', { timeline: 'tag' }) + this.$store.dispatch('startFetching', { 'tag': this.tag }) + } + }, + destroyed () { + this.$store.dispatch('stopFetching', 'tag') + } +} + +export default TagTimeline diff --git a/src/components/tag_timeline/tag_timeline.js~ b/src/components/tag_timeline/tag_timeline.js~ new file mode 100644 index 00000000..084e69d3 --- /dev/null +++ b/src/components/tag_timeline/tag_timeline.js~ @@ -0,0 +1,12 @@ +import Timeline from '../timeline/timeline.vue' + +const TagTimeline = { + components: { + Timeline + }, + computed: { + timeline () { return this.$store.state.statuses.timelines.tag } + } +}; + +export default TagTimeline diff --git a/src/components/tag_timeline/tag_timeline.vue b/src/components/tag_timeline/tag_timeline.vue new file mode 100644 index 00000000..62bb579a --- /dev/null +++ b/src/components/tag_timeline/tag_timeline.vue @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/components/tag_timeline/tag_timeline.vue~ b/src/components/tag_timeline/tag_timeline.vue~ new file mode 100644 index 00000000..158ae399 --- /dev/null +++ b/src/components/tag_timeline/tag_timeline.vue~ @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 06435745..bd80d57b 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -8,7 +8,8 @@ const Timeline = { 'timeline', 'timelineName', 'title', - 'userId' + 'userId', + 'tag' ], computed: { timelineError () { return this.$store.state.statuses.error }, @@ -39,7 +40,8 @@ const Timeline = { credentials, timeline: this.timelineName, showImmediately, - userId: this.userId + userId: this.userId, + tag: this.tag }) // don't fetch followers for public, friend, twkn @@ -62,7 +64,8 @@ const Timeline = { timeline: this.timelineName, older: true, showImmediately: true, - userId: this.userId + userId: this.userId, + tag: this.tag }).then(() => store.commit('setLoading', { timeline: this.timelineName, value: false })) }, fetchFollowers () { -- cgit v1.2.3-70-g09d2 From 59f07c0704df7750ec876882de2a38af35d0293b Mon Sep 17 00:00:00 2001 From: eal Date: Sun, 17 Sep 2017 14:37:48 +0300 Subject: Remove cache file. --- src/components/tag_timeline/tag_timeline.vue~ | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 src/components/tag_timeline/tag_timeline.vue~ (limited to 'src/components') diff --git a/src/components/tag_timeline/tag_timeline.vue~ b/src/components/tag_timeline/tag_timeline.vue~ deleted file mode 100644 index 158ae399..00000000 --- a/src/components/tag_timeline/tag_timeline.vue~ +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file -- cgit v1.2.3-70-g09d2 From c96a7b582bfc12b4af437fbd0d75ed8762065288 Mon Sep 17 00:00:00 2001 From: eal Date: Sun, 17 Sep 2017 14:42:04 +0300 Subject: Remove another cache file. --- src/components/tag_timeline/tag_timeline.js~ | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/components/tag_timeline/tag_timeline.js~ (limited to 'src/components') diff --git a/src/components/tag_timeline/tag_timeline.js~ b/src/components/tag_timeline/tag_timeline.js~ deleted file mode 100644 index 084e69d3..00000000 --- a/src/components/tag_timeline/tag_timeline.js~ +++ /dev/null @@ -1,12 +0,0 @@ -import Timeline from '../timeline/timeline.vue' - -const TagTimeline = { - components: { - Timeline - }, - computed: { - timeline () { return this.$store.state.statuses.timelines.tag } - } -}; - -export default TagTimeline -- cgit v1.2.3-70-g09d2