diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-08-22 21:32:31 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-08-22 21:32:31 +0000 |
| commit | 8e97a40c700797819bf92c61398daff230404228 (patch) | |
| tree | f5b529fa4acea50092db7229724cbd02f845928b /src/modules/config.js | |
| parent | 4e2feae8686c7ff7cbaec35d0c8e07f0a696c2dd (diff) | |
| parent | a29835375a62549410a7df7922f8eb3f9b391487 (diff) | |
Merge branch 'allow-application-width-configuration' into 'develop'
Allow application width configuration
See merge request pleroma/pleroma-fe!1533
Diffstat (limited to 'src/modules/config.js')
| -rw-r--r-- | src/modules/config.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/config.js b/src/modules/config.js index c34b2c8c..1c2a45c2 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -1,5 +1,5 @@ import Cookies from 'js-cookie' -import { setPreset, applyTheme } from '../services/style_setter/style_setter.js' +import { setPreset, applyTheme, applyConfig } from '../services/style_setter/style_setter.js' import messages from '../i18n/messages' import localeService from '../services/locale/locale.service.js' @@ -87,6 +87,7 @@ export const defaultState = { sidebarColumnWidth: '25rem', contentColumnWidth: '45rem', notifsColumnWidth: '25rem', + navbarColumnStretch: false, listsNavigation: false, greentext: undefined, // instance default useAtIcon: undefined, // instance default @@ -165,12 +166,17 @@ const config = { setHighlight ({ commit, dispatch }, { user, color, type }) { commit('setHighlight', { user, color, type }) }, - setOption ({ commit, dispatch }, { name, value }) { + setOption ({ commit, dispatch, state }, { name, value }) { commit('setOption', { name, value }) switch (name) { case 'theme': setPreset(value) break + case 'sidebarColumnWidth': + case 'contentColumnWidth': + case 'notifsColumnWidth': + applyConfig(state) + break case 'customTheme': case 'customThemeSource': applyTheme(value) |
