aboutsummaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-11-26 04:33:41 +0300
committerHenry Jameson <me@hjkos.com>2018-11-26 04:33:41 +0300
commit0ca42bd3d63e209f9c1354a30a3123c1f7317579 (patch)
tree1cf679d20a0b555faae6512f78975eab575e5132 /src/main.js
parentb66d7901f175fcc415f1979dc8fd776dcda9ba79 (diff)
parente9b68b8c972e25df852543e9aa6670088bee06bb (diff)
Merge remote-tracking branch 'upstream/develop' into feature/scope_preferences
* upstream/develop: (36 commits) remove deploy stage remove deploy stage updated and completed German translation minor modification of Chinese translation update Chinese translation Add Chinese language Fix posting. Count spoiler text in the character count. Fixes #135. Added Irish (Gaeilge) Language Copy-Paste too fast from the Catalan file apparently. Now it's in good Occitan. simplify code adapt to destructive change of api Adds Occitan locale Updated italian translation Update oc.json Update oc.json Update of the oc.json file Actualizacion del fichièr oc.json Sort messages object by language code so that it's easier from the UI to browse them. explicitly set collapseMessageWithSubject to undefined Fall back to instance settings consistently ...
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.js b/src/main.js
index 76a32bf2..44ca231f 100644
--- a/src/main.js
+++ b/src/main.js
@@ -100,6 +100,8 @@ window.fetch('/api/statusnet/config.json')
var theme = (config.theme)
var background = (config.background)
+ var hidePostStats = (config.hidePostStats)
+ var hideUserStats = (config.hideUserStats)
var logo = (config.logo)
var logoMask = (typeof config.logoMask === 'undefined' ? true : config.logoMask)
var logoMargin = (typeof config.logoMargin === 'undefined' ? 0 : config.logoMargin)
@@ -115,6 +117,8 @@ window.fetch('/api/statusnet/config.json')
store.dispatch('setInstanceOption', { name: 'theme', value: theme })
store.dispatch('setInstanceOption', { name: 'background', value: background })
+ store.dispatch('setInstanceOption', { name: 'hidePostStats', value: hidePostStats })
+ store.dispatch('setInstanceOption', { name: 'hideUserStats', value: hideUserStats })
store.dispatch('setInstanceOption', { name: 'logo', value: logo })
store.dispatch('setInstanceOption', { name: 'logoMask', value: logoMask })
store.dispatch('setInstanceOption', { name: 'logoMargin', value: logoMargin })
@@ -217,9 +221,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 })