forked from AkkomaGang/akkoma-fe
Use a centralized fallback for missing values and use instance.federating instead of
instance.federation.enabled
This commit is contained in:
parent
8d14036a23
commit
d899d06973
3 changed files with 8 additions and 2 deletions
|
@ -228,6 +228,12 @@ const getNodeInfo = async ({ store }) => {
|
||||||
|
|
||||||
const federation = metadata.federation
|
const federation = metadata.federation
|
||||||
store.dispatch('setInstanceOption', { name: 'federationPolicy', value: federation })
|
store.dispatch('setInstanceOption', { name: 'federationPolicy', value: federation })
|
||||||
|
store.dispatch('setInstanceOption', {
|
||||||
|
name: 'federating',
|
||||||
|
value: typeof federation.enabled === 'undefined'
|
||||||
|
? true
|
||||||
|
: federation.enabled
|
||||||
|
})
|
||||||
|
|
||||||
const accounts = metadata.staffAccounts
|
const accounts = metadata.staffAccounts
|
||||||
await resolveStaffAccounts({ store, accounts })
|
await resolveStaffAccounts({ store, accounts })
|
||||||
|
|
|
@ -11,7 +11,7 @@ const NavPanel = {
|
||||||
chat: state => state.chat.channel,
|
chat: state => state.chat.channel,
|
||||||
followRequestCount: state => state.api.followRequests.length,
|
followRequestCount: state => state.api.followRequests.length,
|
||||||
privateMode: state => state.instance.private,
|
privateMode: state => state.instance.private,
|
||||||
federating: state => state.instance.federationPolicy.enabled || state.instance.federationPolicy.enabled !== false
|
federating: state => state.instance.federating
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ const SideDrawer = {
|
||||||
return this.$store.state.instance.private
|
return this.$store.state.instance.private
|
||||||
},
|
},
|
||||||
federating () {
|
federating () {
|
||||||
return this.$store.state.instance.federationPolicy.enabled || this.$store.state.instance.federationPolicy.enabled !== false
|
return this.$store.state.instance.federating
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in a new issue