From 958dfaa960eacf91564f9c7d287a7bc8e0061b3b Mon Sep 17 00:00:00 2001 From: CoolElectronics Date: Mon, 10 Jun 2024 22:53:10 -0400 Subject: [PATCH] timeline visiblity stuff etc etc --- src/boot/routes.js | 2 ++ .../social_timeline/social_timeline.js | 18 ++++++++++++++++++ .../social_timeline/social_timeline.vue | 9 +++++++++ src/components/timeline_menu/timeline_menu.js | 3 ++- .../timeline_menu_content.vue | 16 ++++++++++++++++ .../timeline_menu_tabs/timeline_menu_tabs.vue | 12 ++++++++++++ src/i18n/en.json | 3 ++- src/lib/timeline_visibility.js | 3 ++- 8 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 src/components/social_timeline/social_timeline.js create mode 100644 src/components/social_timeline/social_timeline.vue diff --git a/src/boot/routes.js b/src/boot/routes.js index 93a94a9b..470f1345 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -24,6 +24,7 @@ import ListEdit from 'components/list_edit/list_edit.vue' import AnnouncementsPage from 'components/announcements_page/announcements_page.vue' import RegistrationRequestSent from 'components/registration_request_sent/registration_request_sent.vue' import AwaitingEmailConfirmation from 'components/awaiting_email_confirmation/awaiting_email_confirmation.vue' +import SocialTimeline from '../components/social_timeline/social_timeline' export default (store) => { const validateAuthenticatedRoute = (to, from, next) => { @@ -46,6 +47,7 @@ export default (store) => { { name: 'public-external-timeline', path: '/main/all', component: PublicAndExternalTimeline }, { name: 'public-timeline', path: '/main/public', component: PublicTimeline }, { name: 'bubble-timeline', path: '/main/bubble', component: BubbleTimeline }, + { name: 'social-timeline', path: '/main/social', component: BubbleTimeline }, { name: 'friends', path: '/main/friends', component: FriendsTimeline, beforeEnter: validateAuthenticatedRoute }, { name: 'tag-timeline', path: '/tag/:tag', component: TagTimeline }, { name: 'bookmarks', path: '/bookmarks', component: BookmarkTimeline }, diff --git a/src/components/social_timeline/social_timeline.js b/src/components/social_timeline/social_timeline.js new file mode 100644 index 00000000..f3ed4a82 --- /dev/null +++ b/src/components/social_timeline/social_timeline.js @@ -0,0 +1,18 @@ +import Timeline from '../timeline/timeline.vue' +const SocialTimeline = { + components: { + Timeline + }, + computed: { + timeline () { return this.$store.state.statuses.timelines.bubble } + }, + created () { + this.$store.dispatch('startFetchingTimeline', { timeline: 'social' }) + }, + unmounted () { + this.$store.dispatch('stopFetchingTimeline', 'bubble') + } + +} + +export default SocialTimeline diff --git a/src/components/social_timeline/social_timeline.vue b/src/components/social_timeline/social_timeline.vue new file mode 100644 index 00000000..a25f45dd --- /dev/null +++ b/src/components/social_timeline/social_timeline.vue @@ -0,0 +1,9 @@ + + + diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js index a3cb968e..83b6b005 100644 --- a/src/components/timeline_menu/timeline_menu.js +++ b/src/components/timeline_menu/timeline_menu.js @@ -16,7 +16,8 @@ export const timelineNames = () => { 'dms': 'nav.dms', 'public-timeline': 'nav.public_tl', 'public-external-timeline': 'nav.twkn', - 'bubble-timeline': 'nav.bubble_timeline' + 'bubble-timeline': 'nav.bubble_timeline', + 'social-timeline': 'nav.social_timeline', } } diff --git a/src/components/timeline_menu_tabs/timeline_menu_content.vue b/src/components/timeline_menu_tabs/timeline_menu_content.vue index d08f6380..fcbebbdd 100644 --- a/src/components/timeline_menu_tabs/timeline_menu_content.vue +++ b/src/components/timeline_menu_tabs/timeline_menu_content.vue @@ -32,6 +32,22 @@ >{{ $t("nav.bubble_timeline") }} +
  • + + + {{ $t("nav.social_timeline") }} + +
  • + + + ( const federatedTimelineAvailable = (state) => state.instance.federatedTimelineAvailable; export const federatedTimelineVisible = (state) => ( - federatedTimelineAvailable(state) && currentUserOrTimelineVisibleUnauthenticated(state, 'federated') + //federatedTimelineAvailable(state) && should always be available? + currentUserOrTimelineVisibleUnauthenticated(state, 'federated') ); export const publicTimelineVisible = (state) => (