aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/first-time/init-menu.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-02-28 03:25:29 +0800
committerGitHub <noreply@github.com>2018-02-28 03:25:29 +0800
commit3fefccd37219c9b4b513fc8d929723e07022b9c4 (patch)
tree22865ecd672570a6162ac3c9402ec9d63ad3f7ef /ui/app/first-time/init-menu.js
parent6a7ea00cd34f83b257f6b4280a5f4e20aa5d34ee (diff)
parentced62ac551a095c8f94f550f0c01a9d4fd04ce5b (diff)
downloadtangerine-wallet-browser-3fefccd37219c9b4b513fc8d929723e07022b9c4.tar.gz
tangerine-wallet-browser-3fefccd37219c9b4b513fc8d929723e07022b9c4.tar.zst
tangerine-wallet-browser-3fefccd37219c9b4b513fc8d929723e07022b9c4.zip
Merge branch 'master' into mascara-deploy
Diffstat (limited to 'ui/app/first-time/init-menu.js')
-rw-r--r--ui/app/first-time/init-menu.js31
1 files changed, 29 insertions, 2 deletions
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index cc7c51bd3..0e08da8db 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -7,6 +7,10 @@ const Mascot = require('../components/mascot')
const actions = require('../actions')
const Tooltip = require('../components/tooltip')
const getCaretCoordinates = require('textarea-caret')
+const environmentType = require('../../../app/scripts/lib/environment-type')
+const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/config').enums
+
+let isSubmitting = false
module.exports = connect(mapStateToProps)(InitializeMenuScreen)
@@ -128,6 +132,18 @@ InitializeMenuScreen.prototype.renderMenu = function (state) {
}, 'Import Existing DEN'),
]),
+ h('.flex-row.flex-center.flex-grow', [
+ h('p.pointer', {
+ onClick: this.showOldUI.bind(this),
+ style: {
+ fontSize: '0.8em',
+ color: '#aeaeae',
+ textDecoration: 'underline',
+ marginTop: '32px',
+ },
+ }, 'Use classic interface'),
+ ]),
+
])
)
}
@@ -144,7 +160,15 @@ InitializeMenuScreen.prototype.componentDidMount = function () {
}
InitializeMenuScreen.prototype.showRestoreVault = function () {
- this.props.dispatch(actions.showRestoreVault())
+ this.props.dispatch(actions.markPasswordForgotten())
+ if (environmentType() === 'popup') {
+ global.platform.openExtensionInBrowser()
+ }
+}
+
+InitializeMenuScreen.prototype.showOldUI = function () {
+ this.props.dispatch(actions.setFeatureFlag('betaUI', false, 'OLD_UI_NOTIFICATION_MODAL'))
+ .then(() => this.props.dispatch(actions.setNetworkEndpoints(OLD_UI_NETWORK_TYPE)))
}
InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
@@ -164,7 +188,10 @@ InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
return
}
- this.props.dispatch(actions.createNewVaultAndKeychain(password))
+ if (!isSubmitting) {
+ isSubmitting = true
+ this.props.dispatch(actions.createNewVaultAndKeychain(password))
+ }
}
InitializeMenuScreen.prototype.inputChanged = function (event) {