From b7411c85f4c8b4c9eaaf34ff496af121b72f016b Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Sat, 10 Dec 2022 21:17:41 +0200 Subject: [PATCH] Don't show timeline links if disabled and logged out --- src/components/desktop_nav/desktop_nav.js | 4 ++++ src/components/desktop_nav/desktop_nav.vue | 2 ++ src/components/timeline_menu/timeline_menu_content.js | 3 ++- src/components/timeline_menu/timeline_menu_content.vue | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/desktop_nav/desktop_nav.js b/src/components/desktop_nav/desktop_nav.js index f4900c38..2fb8a5ac 100644 --- a/src/components/desktop_nav/desktop_nav.js +++ b/src/components/desktop_nav/desktop_nav.js @@ -98,11 +98,15 @@ export default { logoLeft () { return this.$store.state.instance.logoLeft }, currentUser () { return this.$store.state.users.currentUser }, privateMode () { return this.$store.state.instance.private }, + federating () { return this.$store.state.instance.federating }, shouldConfirmLogout () { return this.$store.getters.mergedConfig.modalOnLogout }, showBubbleTimeline () { return this.$store.state.instance.localBubbleInstances.length > 0 + }, + restrictedTimelines () { + return this.$store.state.instance.restrict_unauthenticated.timelines } }, methods: { diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 92d3fa5b..a52989a5 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -44,6 +44,7 @@ /> @@ -67,6 +68,7 @@ /> diff --git a/src/components/timeline_menu/timeline_menu_content.js b/src/components/timeline_menu/timeline_menu_content.js index df15030b..25bd30d9 100644 --- a/src/components/timeline_menu/timeline_menu_content.js +++ b/src/components/timeline_menu/timeline_menu_content.js @@ -24,7 +24,8 @@ const TimelineMenuContent = { currentUser: state => state.users.currentUser, privateMode: state => state.instance.private, federating: state => state.instance.federating, - showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0) + showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0), + restrictedTimelines: state => state.instance.restrict_unauthenticated.timelines }) } } diff --git a/src/components/timeline_menu/timeline_menu_content.vue b/src/components/timeline_menu/timeline_menu_content.vue index 27aece22..220b0278 100644 --- a/src/components/timeline_menu/timeline_menu_content.vue +++ b/src/components/timeline_menu/timeline_menu_content.vue @@ -32,7 +32,7 @@ >{{ $t("nav.bubble_timeline") }} -
  • +
  • {{ $t("nav.public_tl") }}
  • -
  • +