diff --git a/web/src/services/config.ts b/web/src/services/config.ts index 2d1f8fb7..7010e14b 100644 --- a/web/src/services/config.ts +++ b/web/src/services/config.ts @@ -164,6 +164,7 @@ const Config = { }, saveObject(key: string, value: T) { + this._cache[key] = value; localStorage.setItem(key, JSON.stringify(value)); }, diff --git a/web/src/store/dispatch.ts b/web/src/store/dispatch.ts index 9eba45e1..14802863 100644 --- a/web/src/store/dispatch.ts +++ b/web/src/store/dispatch.ts @@ -195,7 +195,7 @@ export const dispatchToggleTheme: Dispatcher = export const dispatchPanelLayoutChange = (changes: Partial): Dispatcher => ( (dispatch: DispatchFn, getState: StateProvider) => { const { panel } = getState(); - config.panelLayout = { ...config.panelLayout, ...panel }; + config.panelLayout = { ...panel, ...changes }; dispatch(newPanelStateChangeAction(changes)); } ); diff --git a/web/src/store/reducers.ts b/web/src/store/reducers.ts index 8bc46bbe..c4fb67f7 100644 --- a/web/src/store/reducers.ts +++ b/web/src/store/reducers.ts @@ -148,7 +148,7 @@ export const getInitialState = (): State => ({ useSystemTheme: localConfig.useSystemTheme, }, monaco: config.monacoSettings, - panel: defaultPanelProps + panel: localConfig.panelLayout }); export const createRootReducer = history => combineReducers({