mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-09 10:13:42 +00:00
Don't show timeline links if disabled and logged out
This commit is contained in:
parent
9bf310d509
commit
6e1ba218df
4 changed files with 10 additions and 3 deletions
|
@ -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: {
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="currentUser || !(privateMode || restrictedTimelines.public)"
|
||||
:to="{ name: 'public-timeline' }"
|
||||
class="nav-icon"
|
||||
>
|
||||
|
@ -67,6 +68,7 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="federating && (currentUser || !(privateMode || restrictedTimelines.federated))"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
>
|
||||
|
|
|
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
>{{ $t("nav.bubble_timeline") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="currentUser || !privateMode">
|
||||
<li v-if="currentUser || !(privateMode || restrictedTimelines.public)">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'public-timeline' }"
|
||||
|
@ -48,7 +48,7 @@
|
|||
>{{ $t("nav.public_tl") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="federating && (currentUser || !privateMode)">
|
||||
<li v-if="federating && (currentUser || !(privateMode || restrictedTimelines.federated))">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
|
|
Loading…
Reference in a new issue