From b552d8116af104f4e17ed975ea47ebfb1168d36d Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Sat, 18 Mar 2023 20:01:05 +0000 Subject: [PATCH] add timeline visibility setting parsing --- src/boot/after_store.js | 1 + src/components/desktop_nav/desktop_nav.js | 1 + src/components/desktop_nav/desktop_nav.vue | 4 ++-- src/components/timeline_menu/timeline_menu_content.js | 1 + src/components/timeline_menu/timeline_menu_content.vue | 4 ++-- src/components/timeline_menu_tabs/timeline_menu_content.js | 5 ++++- src/components/timeline_menu_tabs/timeline_menu_content.vue | 4 ++-- src/components/timeline_menu_tabs/timeline_menu_tabs.js | 2 ++ src/components/timeline_menu_tabs/timeline_menu_tabs.vue | 4 ++-- 9 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/boot/after_store.js b/src/boot/after_store.js index b48bfb09..d45584c0 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -323,6 +323,7 @@ const getNodeInfo = async ({ store }) => { }) store.dispatch('setInstanceOption', { name: 'publicTimelineVisibility', value: metadata.publicTimelineVisibility }) + store.dispatch('setInstanceOption', { name: 'federatedTimelineAvailable', value: metadata.federatedTimelineAvailable }) const accountActivationRequired = metadata.accountActivationRequired store.dispatch('setInstanceOption', { name: 'accountActivationRequired', value: accountActivationRequired }) diff --git a/src/components/desktop_nav/desktop_nav.js b/src/components/desktop_nav/desktop_nav.js index 4cf5a477..1978ce8f 100644 --- a/src/components/desktop_nav/desktop_nav.js +++ b/src/components/desktop_nav/desktop_nav.js @@ -107,6 +107,7 @@ export default { }, ...mapState({ publicTimelineVisibility: state => state.instance.publicTimelineVisibility, + federatedTimelineAvailable: state => state.instance.federatedTimelineAvailable, }) }, methods: { diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index a41e9972..61fd838c 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -56,7 +56,7 @@ /> @@ -70,7 +70,7 @@ state.instance.federating, showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0), publicTimelineVisibility: state => state.instance.publicTimelineVisibility, + federatedTimelineAvailable: state => state.instance.federatedTimelineAvailable, }) } } diff --git a/src/components/timeline_menu/timeline_menu_content.vue b/src/components/timeline_menu/timeline_menu_content.vue index 0144f2fd..8f636a0e 100644 --- a/src/components/timeline_menu/timeline_menu_content.vue +++ b/src/components/timeline_menu/timeline_menu_content.vue @@ -16,7 +16,7 @@ >{{ $t("nav.home_timeline") }} -
  • +
  • {{ $t("nav.public_tl") }}
  • -
  • +
  • state.users.currentUser, privateMode: state => state.instance.private, - federating: state => state.instance.federating + federating: state => state.instance.federating, + showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0), + publicTimelineVisibility: state => state.instance.publicTimelineVisibility, + federatedTimelineAvailable: state => state.instance.federatedTimelineAvailable, }) } } diff --git a/src/components/timeline_menu_tabs/timeline_menu_content.vue b/src/components/timeline_menu_tabs/timeline_menu_content.vue index 32548c49..bb54595d 100644 --- a/src/components/timeline_menu_tabs/timeline_menu_content.vue +++ b/src/components/timeline_menu_tabs/timeline_menu_content.vue @@ -16,7 +16,7 @@ >{{ $t("nav.home_timeline") }}
  • -
  • +
  • {{ $t("nav.public_tl") }}
  • -
  • +
  • state.users.currentUser, publicTimelineVisibility: state => state.instance.publicTimelineVisibility, + federatedTimelineAvailable: state => state.instance.federatedTimelineAvailable, + showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0), }) }, methods: { diff --git a/src/components/timeline_menu_tabs/timeline_menu_tabs.vue b/src/components/timeline_menu_tabs/timeline_menu_tabs.vue index e922ffcc..1f0d47ee 100644 --- a/src/components/timeline_menu_tabs/timeline_menu_tabs.vue +++ b/src/components/timeline_menu_tabs/timeline_menu_tabs.vue @@ -28,7 +28,7 @@ /> @@ -42,7 +42,7 @@