Merge branch 'fix-features-panel' into 'develop'
Fix Features panel See merge request pleroma/pleroma-fe!366
This commit is contained in:
commit
2f11ec296e
|
@ -217,9 +217,11 @@ window.fetch('/nodeinfo/2.0.json')
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
const metadata = data.metadata
|
const metadata = data.metadata
|
||||||
store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: data.metadata.mediaProxy })
|
|
||||||
store.dispatch('setInstanceOption', { name: 'chatAvailable', value: data.metadata.chat })
|
const features = metadata.features
|
||||||
store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: data.metadata.gopher })
|
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
|
const suggestions = metadata.suggestions
|
||||||
store.dispatch('setInstanceOption', { name: 'suggestionsEnabled', value: suggestions.enabled })
|
store.dispatch('setInstanceOption', { name: 'suggestionsEnabled', value: suggestions.enabled })
|
||||||
|
|
Loading…
Reference in New Issue