aboutsummaryrefslogtreecommitdiff
path: root/src/modules/instance.js
diff options
context:
space:
mode:
authorTarteka <info@tarteka.net>2019-10-30 22:17:19 +0100
committerTarteka <info@tarteka.net>2019-10-30 22:17:19 +0100
commitfe4845a7c1ca9d6fa51132a0ef9bc5103facae66 (patch)
tree92aceb88e58d149a5446e5a9d7bca6084cb6fa99 /src/modules/instance.js
parenta178346f1e0fbe2246532bbfeba5fd1cc0c1cb2d (diff)
parent74f5f168d639e9e21e294ac45dd6091694a041cc (diff)
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma-fe into develop
Diffstat (limited to 'src/modules/instance.js')
-rw-r--r--src/modules/instance.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 7d602aa1..0c1235ca 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -1,5 +1,6 @@
import { set } from 'vue'
import { setPreset } from '../services/style_setter/style_setter.js'
+import { instanceDefaultProperties } from './config.js'
const defaultState = {
// Stuff from static/config.json and apiConfig
@@ -72,6 +73,13 @@ const instance = {
}
}
},
+ getters: {
+ instanceDefaultConfig (state) {
+ return instanceDefaultProperties
+ .map(key => [key, state[key]])
+ .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {})
+ }
+ },
actions: {
setInstanceOption ({ commit, dispatch }, { name, value }) {
commit('setInstanceOption', { name, value })