aboutsummaryrefslogtreecommitdiff
path: root/src/modules/instance.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/instance.js')
-rw-r--r--src/modules/instance.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/modules/instance.js b/src/modules/instance.js
new file mode 100644
index 00000000..228cee4c
--- /dev/null
+++ b/src/modules/instance.js
@@ -0,0 +1,47 @@
+import { set } from 'vue'
+
+const defaultState = {
+ name: 'Pleroma FE',
+ registrationOpen: true,
+ textlimit: 5000,
+ server: 'http://localhost:4040/',
+ theme: 'pleroma-dark',
+ background: 'img.png',
+ logo: '/static/logo.png',
+ logoMask: true,
+ logoMargin: '.2em',
+ redirectRootNoLogin: '/main/all',
+ redirectRootLogin: '/main/friends',
+ showInstanceSpecificPanel: false,
+ scopeOptionsEnabled: true,
+ formattingOptionsEnabled: false,
+ collapseMessageWithSubject: false,
+ disableChat: false,
+ // Nasty stuff
+ pleromaBackend: true,
+ customEmoji: [],
+ // Html stuff
+ instanceSpecificPanelContent: '',
+ tos: ''
+}
+
+const instance = {
+ state: defaultState,
+ mutations: {
+ setInstanceOption (state, { name, value }) {
+ set(state, name, value)
+ }
+ },
+ actions: {
+ setInstanceOption ({ commit, dispatch }, { name, value }) {
+ commit('setInstanceOption', {name, value})
+ switch (name) {
+ case 'name':
+ dispatch('setPageTitle')
+ break
+ }
+ }
+ }
+}
+
+export default instance