mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-08 09:29:10 +00:00
add timeline visibility setting parsing
This commit is contained in:
parent
7361f4e77e
commit
b92b2f74a4
9 changed files with 17 additions and 9 deletions
|
@ -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 })
|
||||
|
|
|
@ -107,6 +107,7 @@ export default {
|
|||
},
|
||||
...mapState({
|
||||
publicTimelineVisibility: state => state.instance.publicTimelineVisibility,
|
||||
federatedTimelineAvailable: state => state.instance.federatedTimelineAvailable,
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="currentUser && showBubbleTimeline"
|
||||
v-if="(currentUser || publicTimelineVisibility?.bubble) && showBubbleTimeline"
|
||||
:to="{ name: 'bubble-timeline' }"
|
||||
class="nav-icon"
|
||||
>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<router-link
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="(currentUser || (publicTimelineVisibility?.federated ?? true))"
|
||||
v-if="federatedTimelineAvailable && (currentUser || (publicTimelineVisibility?.federated ?? true))"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
|
|
@ -26,6 +26,7 @@ const TimelineMenuContent = {
|
|||
federating: state => state.instance.federating,
|
||||
showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0),
|
||||
publicTimelineVisibility: state => state.instance.publicTimelineVisibility,
|
||||
federatedTimelineAvailable: state => state.instance.federatedTimelineAvailable,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
>{{ $t("nav.home_timeline") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="currentUser && showBubbleTimeline">
|
||||
<li v-if="(currentUser || publicTimelineVisibility?.bubble) && showBubbleTimeline">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'bubble-timeline' }"
|
||||
|
@ -48,7 +48,7 @@
|
|||
>{{ $t("nav.public_tl") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="federating && (currentUser || !privateMode) && (currentUser || (publicTimelineVisibility?.federated ?? true))">
|
||||
<li v-if="federating && federatedTimelineAvailable && (currentUser || !privateMode) && (currentUser || (publicTimelineVisibility?.federated ?? true))">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
|
|
|
@ -22,7 +22,10 @@ const TimelineMenuContent = {
|
|||
...mapState({
|
||||
currentUser: state => 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,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
>{{ $t("nav.home_timeline") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="currentUser">
|
||||
<li v-if="(currentUser || publicTimelineVisibility?.bubble) && showBubbleTimeline">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'bubble-timeline' }"
|
||||
|
@ -48,7 +48,7 @@
|
|||
>{{ $t("nav.public_tl") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="federating && (currentUser || !privateMode)">
|
||||
<li v-if="federating && federatedTimelineAvailable && (currentUser || !privateMode || publicTimelineVisibility?.federated)">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
|
|
|
@ -46,6 +46,8 @@ const TimelineMenuTabs = {
|
|||
...mapState({
|
||||
currentUser: state => state.users.currentUser,
|
||||
publicTimelineVisibility: state => state.instance.publicTimelineVisibility,
|
||||
federatedTimelineAvailable: state => state.instance.federatedTimelineAvailable,
|
||||
showBubbleTimeline: state => (state.instance.localBubbleInstances.length > 0),
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="currentUser"
|
||||
v-if="(currentUser || publicTimelineVisibility?.bubble) && showBubbleTimeline"
|
||||
:to="{ name: 'bubble-timeline' }"
|
||||
class="nav-icon"
|
||||
>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<router-link
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
class="nav-icon"
|
||||
v-if="currentUser || (publicTimelineVisibility?.federated ?? true)"
|
||||
v-if="(currentUser || (publicTimelineVisibility?.federated ?? true)) && federatedTimelineAvailable"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
|
|
Loading…
Reference in a new issue