aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-09-09 21:51:40 +0300
committerHenry Jameson <me@hjkos.com>2018-09-17 17:51:39 +0300
commit580aae1b545331b284724e54cc31c99e52862f57 (patch)
treee63582b106eaf26921206161a4a7a1976ba21882
parent82fa5d08c4f441fa9df20edab214b99ecb7776b3 (diff)
Added more stuff that's actually being added to instanceConfig, simplified the whitelist.
-rw-r--r--src/lib/persisted_state.js1
-rw-r--r--src/main.js20
-rw-r--r--src/modules/instance.js11
3 files changed, 15 insertions, 17 deletions
diff --git a/src/lib/persisted_state.js b/src/lib/persisted_state.js
index 007515cd..c9eac91f 100644
--- a/src/lib/persisted_state.js
+++ b/src/lib/persisted_state.js
@@ -16,6 +16,7 @@ const saveImmedeatelyActions = [
'markNotificationsAsSeen',
'clearCurrentUser',
'setCurrentUser',
+ 'setHighlight',
'setOption'
]
diff --git a/src/main.js b/src/main.js
index 23bd2cd3..4e7b55bb 100644
--- a/src/main.js
+++ b/src/main.js
@@ -47,23 +47,7 @@ Vue.use(VueChatScroll)
const persistedStateOptions = {
paths: [
- 'config.collapseMessageWithSubject',
- 'config.hideAttachments',
- 'config.hideAttachmentsInConv',
- 'config.hideNsfw',
- 'config.replyVisibility',
- 'config.notificationVisibility',
- 'config.autoLoad',
- 'config.hoverPreview',
- 'config.streaming',
- 'config.muteWords',
- 'config.customTheme',
- 'config.highlight',
- 'config.loopVideo',
- 'config.loopVideoSilentOnly',
- 'config.pauseOnUnfocused',
- 'config.stopGifs',
- 'config.interfaceLanguage',
+ 'config',
'users.lastLoginName',
'statuses.notifications.maxSavedId'
]
@@ -129,6 +113,8 @@ window.fetch('/api/statusnet/config.json')
store.dispatch('setInstanceOption', { name: 'logo', value: logo })
store.dispatch('setInstanceOption', { name: 'logoMask', value: logoMask })
store.dispatch('setInstanceOption', { name: 'logoMargin', value: logoMargin })
+ store.dispatch('setInstanceOption', { name: 'redirectRootNoLogin', value: redirectRootNoLogin })
+ store.dispatch('setInstanceOption', { name: 'redirectRootLogin', value: redirectRootLogin })
store.dispatch('setInstanceOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel })
store.dispatch('setInstanceOption', { name: 'scopeOptionsEnabled', value: scopeOptionsEnabled })
store.dispatch('setInstanceOption', { name: 'formattingOptionsEnabled', value: formattingOptionsEnabled })
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 228cee4c..a4fc9651 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -1,6 +1,7 @@
import { set } from 'vue'
const defaultState = {
+ // Stuff from static/config.json and apiConfig
name: 'Pleroma FE',
registrationOpen: true,
textlimit: 5000,
@@ -17,9 +18,19 @@ const defaultState = {
formattingOptionsEnabled: false,
collapseMessageWithSubject: false,
disableChat: false,
+
// Nasty stuff
pleromaBackend: true,
+ emoji: [],
customEmoji: [],
+
+ // Feature-set, apparently, not everything here is reported...
+ mediaProxyAvailable: false,
+ chatAvailable: false,
+ gopherAvailable: false,
+ suggestionsEnabled: false,
+ suggestionsWeb: '',
+
// Html stuff
instanceSpecificPanelContent: '',
tos: ''