aboutsummaryrefslogtreecommitdiff
path: root/src/modules/config.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/config.js')
-rw-r--r--src/modules/config.js28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/modules/config.js b/src/modules/config.js
index cb59acaa..375d0167 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -4,7 +4,6 @@ import StyleSetter from '../services/style_setter/style_setter.js'
const browserLocale = (window.navigator.language || 'en').split('-')[0]
const defaultState = {
- name: 'Pleroma FE',
colors: {},
collapseMessageWithSubject: false,
hideAttachments: false,
@@ -26,11 +25,7 @@ const defaultState = {
},
muteWords: [],
highlight: {},
- interfaceLanguage: browserLocale,
- _internal: {
- currentSaveStateNotice: {},
- noticeClearTimeout: null
- }
+ interfaceLanguage: browserLocale
}
const config = {
@@ -46,36 +41,15 @@ const config = {
} else {
del(state.highlight, user)
}
- },
- settingsSaved (state, { success, error }) {
- if (success) {
- if (state.noticeClearTimeout) {
- clearTimeout(state.noticeClearTimeout)
- }
- set(state._internal, 'currentSaveStateNotice', { error: false, data: success })
- set(state._internal, 'noticeClearTimeout',
- setTimeout(() => del(state._internal, 'currentSaveStateNotice'), 2000))
- } else {
- set(state._internal, 'currentSaveStateNotice', { error: true, errorData: error })
- }
}
},
actions: {
- setPageTitle ({state}, option = '') {
- document.title = `${option} ${state.name}`
- },
setHighlight ({ commit, dispatch }, { user, color, type }) {
commit('setHighlight', {user, color, type})
},
- settingsSaved ({ commit, dispatch }, { success, error }) {
- commit('settingsSaved', { success, error })
- },
setOption ({ commit, dispatch }, { name, value }) {
commit('setOption', {name, value})
switch (name) {
- case 'name':
- dispatch('setPageTitle')
- break
case 'theme':
StyleSetter.setPreset(value, commit)
break