mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-08 17:39:09 +00:00
Merge branch 'fix-features-panel' into 'develop'
Fix Features panel See merge request pleroma/pleroma-fe!366
This commit is contained in:
commit
2f11ec296e
1 changed files with 5 additions and 3 deletions
|
@ -217,9 +217,11 @@ window.fetch('/nodeinfo/2.0.json')
|
|||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
const metadata = data.metadata
|
||||
store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: data.metadata.mediaProxy })
|
||||
store.dispatch('setInstanceOption', { name: 'chatAvailable', value: data.metadata.chat })
|
||||
store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: data.metadata.gopher })
|
||||
|
||||
const features = metadata.features
|
||||
store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: features.includes('media_proxy') })
|
||||
store.dispatch('setInstanceOption', { name: 'chatAvailable', value: features.includes('chat') })
|
||||
store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: features.includes('gopher') })
|
||||
|
||||
const suggestions = metadata.suggestions
|
||||
store.dispatch('setInstanceOption', { name: 'suggestionsEnabled', value: suggestions.enabled })
|
||||
|
|
Loading…
Reference in a new issue