diff options
Diffstat (limited to 'frontend/app/views/page/page.reducer.js')
| -rw-r--r-- | frontend/app/views/page/page.reducer.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/frontend/app/views/page/page.reducer.js b/frontend/app/views/page/page.reducer.js index a1f281a..9eb6ff7 100644 --- a/frontend/app/views/page/page.reducer.js +++ b/frontend/app/views/page/page.reducer.js @@ -11,7 +11,9 @@ const initialState = crudState('page', { tileList: false, showingPopups: true, sidebarOnRight: true, + cursorList: false, popups: {}, + pickedCursor: null, }, options: { } @@ -98,6 +100,7 @@ export default function pageReducer(state = initialState, action) { addingTile: true, editingTile: false, tileList: false, + cursorList: false, } } @@ -107,6 +110,7 @@ export default function pageReducer(state = initialState, action) { editor: { ...state.editor, addingTile: false, + cursorList: false, } } @@ -118,6 +122,7 @@ export default function pageReducer(state = initialState, action) { addingTile: !state.editor.addingTile, editingTile: false, tileList: false, + cursorList: false, } } @@ -131,6 +136,7 @@ export default function pageReducer(state = initialState, action) { editingTile: true, currentEditTileId: action.tile_id, tileList: false, + cursorList: false, } } @@ -140,6 +146,7 @@ export default function pageReducer(state = initialState, action) { editor: { ...state.editor, editingTile: false, + cursorList: false, } } @@ -152,6 +159,7 @@ export default function pageReducer(state = initialState, action) { addingTile: false, editingTile: false, tileList: true, + cursorList: false, } } @@ -161,6 +169,7 @@ export default function pageReducer(state = initialState, action) { editor: { ...state.editor, tileList: false, + cursorList: false, } } @@ -172,6 +181,7 @@ export default function pageReducer(state = initialState, action) { addingTile: false, editingTile: false, tileList: !state.editor.tileList, + cursorList: false, } } @@ -183,6 +193,27 @@ export default function pageReducer(state = initialState, action) { addingTile: false, editingTile: false, tileList: false, + cursorList: false, + } + } + + case types.page.toggle_cursor_list: + return { + ...state, + editor: { + ...state.editor, + cursorList: (typeof action.visible !== undefined) + ? action.visible : !state.editor.cursorList + } + } + + case types.page.pick_cursor: + return { + ...state, + editor: { + ...state.editor, + cursorList: false, + pickedCursor: action.cursor, } } |
