aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/reducers')
-rw-r--r--ui/app/reducers/app.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index 3a98d53a9..878852bf6 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -36,6 +36,8 @@ function reduceApp (state, action) {
var appState = extend({
shouldClose: false,
menuOpen: false,
+ modalOpen: false,
+ sidebarOpen: false,
currentView: seedWords ? seedConfView : defaultView,
accountDetail: {
subview: 'transactions',
@@ -49,6 +51,27 @@ function reduceApp (state, action) {
}, state.appState)
switch (action.type) {
+ // sidebar methods
+ case actions.SIDEBAR_OPEN:
+ return extend(appState, {
+ sidebarOpen: true,
+ })
+
+ case actions.SIDEBAR_CLOSE:
+ return extend(appState, {
+ sidebarOpen: false,
+ })
+
+ // modal methods:
+ case actions.MODAL_OPEN:
+ return extend(appState, {
+ modalOpen: true,
+ })
+
+ case actions.MODAL_CLOSE:
+ return extend(appState, {
+ modalOpen: false,
+ })
// transition methods