Add checks for currentUser on sidebar
This commit is contained in:
parent
9f7f9e2798
commit
7361f4e77e
3 changed files with 10 additions and 3 deletions
|
@ -32,7 +32,7 @@
|
|||
>{{ $t("nav.bubble_timeline") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="(currentUser || !privateMode) && (publicTimelineVisibility?.local ?? true)">
|
||||
<li v-if="(currentUser || !privateMode) && (currentUser || (publicTimelineVisibility?.local ?? true))">
|
||||
<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) && (publicTimelineVisibility?.federated ?? true)">
|
||||
<li v-if="federating && (currentUser || !privateMode) && (currentUser || (publicTimelineVisibility?.federated ?? true))">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
|
|
|
@ -4,6 +4,7 @@ import { library } from '@fortawesome/fontawesome-svg-core'
|
|||
import {
|
||||
faChevronDown
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
library.add(faChevronDown)
|
||||
|
||||
|
@ -41,7 +42,11 @@ const TimelineMenuTabs = {
|
|||
},
|
||||
privateMode () {
|
||||
return this.$store.state.instance.private
|
||||
}
|
||||
},
|
||||
...mapState({
|
||||
currentUser: state => state.users.currentUser,
|
||||
publicTimelineVisibility: state => state.instance.publicTimelineVisibility,
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
timelineName () {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<router-link
|
||||
:to="{ name: 'public-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="currentUser || (publicTimelineVisibility?.local ?? true)"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
@ -41,6 +42,7 @@
|
|||
<router-link
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="currentUser || (publicTimelineVisibility?.federated ?? true)"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
|
Loading…
Reference in a new issue