diff options
| author | Hakaba Hitoyo <hakabahitoyo@example.com> | 2018-08-02 17:57:00 +0900 |
|---|---|---|
| committer | Hakaba Hitoyo <hakabahitoyo@example.com> | 2018-08-02 17:57:00 +0900 |
| commit | bcd499c3725d620bc9d4612e04add76cf7a4e395 (patch) | |
| tree | 5bc3bfc2294f4a2cd09377eee1593ae9c088e69e /src/main.js | |
| parent | 32fd108e97de8a1e1201bcc31f70af9ace77e517 (diff) | |
who to follow panel uses /api/v1/suggestions
Diffstat (limited to 'src/main.js')
| -rw-r--r-- | src/main.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main.js b/src/main.js index bacd7f6d..3c2ac77d 100644 --- a/src/main.js +++ b/src/main.js @@ -89,13 +89,10 @@ window.fetch('/api/statusnet/config.json') window.fetch('/static/config.json') .then((res) => res.json()) .then((data) => { - const {theme, background, logo, showWhoToFollowPanel, whoToFollowProvider, whoToFollowLink, showInstanceSpecificPanel, scopeOptionsEnabled} = data + const {theme, background, logo, showInstanceSpecificPanel, scopeOptionsEnabled} = data store.dispatch('setOption', { name: 'theme', value: theme }) store.dispatch('setOption', { name: 'background', value: background }) store.dispatch('setOption', { name: 'logo', value: logo }) - store.dispatch('setOption', { name: 'showWhoToFollowPanel', value: showWhoToFollowPanel }) - store.dispatch('setOption', { name: 'whoToFollowProvider', value: whoToFollowProvider }) - store.dispatch('setOption', { name: 'whoToFollowLink', value: whoToFollowLink }) store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel }) store.dispatch('setOption', { name: 'scopeOptionsEnabled', value: scopeOptionsEnabled }) if (data['chatDisabled']) { @@ -144,6 +141,14 @@ window.fetch('/static/config.json') }) }) +window.fetch('/nodeinfo/2.0.json') + .then((res) => res.json()) + .then((data) => { + const suggestions = data.metadata.suggestions + store.dispatch('setOption', { name: 'showWhoToFollowPanel', value: suggestions.enabled }) + store.dispatch('setOption', { name: 'whoToFollowLink', value: suggestions.web }) + }) + window.fetch('/static/terms-of-service.html') .then((res) => res.text()) .then((html) => { |
