pleroma-fe/src/components/bookmark_timeline/bookmark_timeline.js

38 lines
981 B
JavaScript
Raw Normal View History

import Timeline from '../timeline/timeline.vue'
const Bookmarks = {
2026-01-06 16:22:52 +02:00
created() {
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
2026-01-06 16:22:52 +02:00
this.$store.dispatch('startFetchingTimeline', {
timeline: 'bookmarks',
bookmarkFolderId: this.folderId || null,
})
},
components: {
2026-01-06 16:22:52 +02:00
Timeline,
},
computed: {
2026-01-06 16:22:52 +02:00
folderId() {
return this.$route.params.id
},
2026-01-06 16:22:52 +02:00
timeline() {
return this.$store.state.statuses.timelines.bookmarks
2026-01-06 16:22:52 +02:00
},
},
watch: {
2026-01-06 16:22:52 +02:00
folderId() {
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
2026-01-06 16:22:52 +02:00
this.$store.dispatch('startFetchingTimeline', {
timeline: 'bookmarks',
bookmarkFolderId: this.folderId || null,
})
},
},
2026-01-06 16:22:52 +02:00
unmounted() {
this.$store.commit('clearTimeline', { timeline: 'bookmarks' })
this.$store.dispatch('stopFetchingTimeline', 'bookmarks')
2026-01-06 16:22:52 +02:00
},
}
export default Bookmarks