aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/src
diff options
context:
space:
mode:
authorJacky Chan <jchan@uber.com>2017-08-18 19:11:26 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-21 12:51:37 +0800
commit0264ecaad77330b151f4bf4248b66f4659a67cce (patch)
tree0d1a062177a9fff3e32ee89459c3c75aee530a1b /mascara/src
parent20cb6a76ddcad83645b8e67b31d0bce3c8cee116 (diff)
downloadtangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar
tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.gz
tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.bz2
tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.lz
tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.xz
tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.tar.zst
tangerine-wallet-browser-0264ecaad77330b151f4bf4248b66f4659a67cce.zip
Adding CreatePasswordScreen
Diffstat (limited to 'mascara/src')
-rw-r--r--mascara/src/app/first-time/create-password-screen.js13
-rw-r--r--mascara/src/app/first-time/index.js54
2 files changed, 67 insertions, 0 deletions
diff --git a/mascara/src/app/first-time/create-password-screen.js b/mascara/src/app/first-time/create-password-screen.js
new file mode 100644
index 000000000..afb1ad8f6
--- /dev/null
+++ b/mascara/src/app/first-time/create-password-screen.js
@@ -0,0 +1,13 @@
+import React, {Component, PropTypes} from 'react'
+
+export default class CreatePasswordScreen extends Component {
+
+ render() {
+ return (
+ <div>
+
+ </div>
+ )
+ }
+
+} \ No newline at end of file
diff --git a/mascara/src/app/first-time/index.js b/mascara/src/app/first-time/index.js
new file mode 100644
index 000000000..a2cb8d71c
--- /dev/null
+++ b/mascara/src/app/first-time/index.js
@@ -0,0 +1,54 @@
+import React, {Component, PropTypes} from 'react'
+import CreatePasswordScreen from './create-password-screen'
+
+export default class FirstTimeFlow extends Component {
+
+ static propTypes = {
+ screenType: PropTypes.string
+ };
+
+ static defaultProps = {
+ screenType: FirstTimeFlow.CREATE_PASSWORD
+ };
+
+ static SCREEN_TYPE = {
+ CREATE_PASSWORD: 'create_password',
+ UNIQUE_IMAGE: 'unique_image',
+ TERM_OF_USE: 'term_of_use',
+ BACK_UP_PHRASE: 'back_up_phrase',
+ CONFIRM_BACK_UP_PHRASE: 'confirm_back_up_phrase',
+ BUY_ETHER: 'buy_ether'
+ };
+
+ static getScreenType = ({isInitialized, noActiveNotices, seedWords}) => {
+ const {SCREEN_TYPE} = FirstTimeFlow
+
+ if (!isInitialized) {
+ return SCREEN_TYPE.CREATE_PASSWORD
+ }
+
+ if (!noActiveNotices) {
+ return SCREEN_TYPE.TERM_OF_USE
+ }
+
+ if (seedWords) {
+ return SCREEN_TYPE.BACK_UP_PHRASE
+ }
+ };
+
+ renderScreen() {
+ const {SCREEN_TYPE} = FirstTimeFlow
+
+ switch (this.props.screenType) {
+ case SCREEN_TYPE.CREATE_PASSWORD:
+ return <CreatePasswordScreen />
+ default:
+ return <noscript />
+ }
+ }
+
+ render() {
+ return <div>{this.renderScreen()}</div>
+ }
+
+}