Added more stuff that's actually being added to instanceConfig, simplified the whitelist.

This commit is contained in:
Henry Jameson 2018-09-09 21:51:40 +03:00
parent 82fa5d08c4
commit 580aae1b54
3 changed files with 15 additions and 17 deletions

View file

@ -16,6 +16,7 @@ const saveImmedeatelyActions = [
'markNotificationsAsSeen',
'clearCurrentUser',
'setCurrentUser',
'setHighlight',
'setOption'
]

View file

@ -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 })

View file

@ -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: ''