aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers/app.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-19 14:31:02 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-19 14:31:02 +0800
commit76981c2ad9b0f8f13fa61ba3b60c07203a81eb57 (patch)
treedfd375c3a0adb26a393d4b9dcf7456141a936423 /ui/app/reducers/app.js
parent514148ffa1652b4e23ffe04fbe23bb0eadbdecb7 (diff)
downloadtangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar
tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.gz
tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.bz2
tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.lz
tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.xz
tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.tar.zst
tangerine-wallet-browser-76981c2ad9b0f8f13fa61ba3b60c07203a81eb57.zip
added new global alert
Diffstat (limited to 'ui/app/reducers/app.js')
-rw-r--r--ui/app/reducers/app.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index f453812b9..50d8bcba7 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -49,6 +49,8 @@ function reduceApp (state, action) {
},
},
sidebarOpen: false,
+ alertOpen: false,
+ alertMessage: null,
networkDropdownOpen: false,
currentView: seedWords ? seedConfView : defaultView,
accountDetail: {
@@ -88,6 +90,19 @@ function reduceApp (state, action) {
sidebarOpen: false,
})
+ // sidebar methods
+ case actions.ALERT_OPEN:
+ return extend(appState, {
+ alertOpen: true,
+ alertMessage: action.value,
+ })
+
+ case actions.ALERT_CLOSE:
+ return extend(appState, {
+ alertOpen: false,
+ alertMessage: null,
+ })
+
// modal methods:
case actions.MODAL_OPEN:
const { name, ...modalProps } = action.payload