aboutsummaryrefslogtreecommitdiff
path: root/src/components/bookmark_timeline
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2024-09-23 23:10:32 +0200
committermarcin mikołajczak <git@mkljczk.pl>2024-09-23 23:13:40 +0200
commit9e45228823cd0fa7eb9388b0eb7780b9609edf66 (patch)
tree1d4680c875616673c0aa8f81ff6d1bfd41314598 /src/components/bookmark_timeline
parenta8092de63808ff1445636f07e11f3602774f1438 (diff)
Bookmark folders
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'src/components/bookmark_timeline')
-rw-r--r--src/components/bookmark_timeline/bookmark_timeline.js19
-rw-r--r--src/components/bookmark_timeline/bookmark_timeline.vue1
2 files changed, 18 insertions, 2 deletions
diff --git a/src/components/bookmark_timeline/bookmark_timeline.js b/src/components/bookmark_timeline/bookmark_timeline.js
index 5ac43d90..9571d630 100644
--- a/src/components/bookmark_timeline/bookmark_timeline.js
+++ b/src/components/bookmark_timeline/bookmark_timeline.js
@@ -1,16 +1,31 @@
import Timeline from '../timeline/timeline.vue'
const Bookmarks = {
+ created () {
+ this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
+ this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
+ },
+ components: {
+ Timeline
+ },
computed: {
+ folderId () {
+ return this.$route.params.id
+ },
timeline () {
return this.$store.state.statuses.timelines.bookmarks
}
},
- components: {
- Timeline
+ watch: {
+ folderId () {
+ this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
+ this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
+ this.$store.dispatch('startFetchingTimeline', { timeline: 'bookmarks', bookmarkFolderId: this.folderId || null })
+ }
},
unmounted () {
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
+ this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
}
}
diff --git a/src/components/bookmark_timeline/bookmark_timeline.vue b/src/components/bookmark_timeline/bookmark_timeline.vue
index 8da6884b..7a096004 100644
--- a/src/components/bookmark_timeline/bookmark_timeline.vue
+++ b/src/components/bookmark_timeline/bookmark_timeline.vue
@@ -3,6 +3,7 @@
:title="$t('nav.bookmarks')"
:timeline="timeline"
:timeline-name="'bookmarks'"
+ :bookmark-folder-id="bookmarkFolderId"
/>
</template>