diff options
| author | lens <lens@neural.garden> | 2021-03-23 21:10:11 +0000 |
|---|---|---|
| committer | lens <lens@neural.garden> | 2021-03-23 21:10:11 +0000 |
| commit | cc1d0c52e104245f9f1c0d77eb24a5a33800be38 (patch) | |
| tree | 02d8483dfe47803525b926a43c582dcfbf61c5db /frontend/app/views/page/page.reducer.js | |
| parent | 81c673f058fda04b96baae7b2302f876479bc0a9 (diff) | |
| parent | 7a3ec205e001e4c071a67ecc5c375612fa72afdc (diff) | |
Merge branch 'master' of asdf.us:swimmer
Diffstat (limited to 'frontend/app/views/page/page.reducer.js')
| -rw-r--r-- | frontend/app/views/page/page.reducer.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/frontend/app/views/page/page.reducer.js b/frontend/app/views/page/page.reducer.js index c2d231a..a1f281a 100644 --- a/frontend/app/views/page/page.reducer.js +++ b/frontend/app/views/page/page.reducer.js @@ -9,6 +9,9 @@ const initialState = crudState('page', { editingTile: false, currentEditTileId: 0, tileList: false, + showingPopups: true, + sidebarOnRight: true, + popups: {}, }, options: { } @@ -195,6 +198,32 @@ export default function pageReducer(state = initialState, action) { } } + case types.page.toggle_popups: + return { + ...state, + editor: { + ...state.editor, + showingPopups: !state.editor.showingPopups, + } + } + + case types.page.load_popups: + return { + ...state, + editor: { + ...state.editor, + popups: action.popups, + } + } + + case types.page.toggle_sidebar_side: + return { + ...state, + editor: { + ...state.editor, + sidebarOnRight: !state.editor.sidebarOnRight, + } + } default: return state |
