This repository was archived by the owner on Feb 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 168
Password mobile #771
Merged
Merged
Password mobile #771
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import React from 'react'; | ||
| import { View, StyleSheet } from 'react-native'; | ||
| import { observer } from 'mobx-react'; | ||
| import PropTypes from 'prop-types'; | ||
| import Background from '../component/background'; | ||
| import MainContent from '../component/main-content'; | ||
| import BoltIcon from '../asset/icon/lightning-bolt'; | ||
| import LightningWord from '../asset/icon/lightning-word'; | ||
| import { Text } from '../component/text'; | ||
| import { FormStretcher } from '../component/form'; | ||
| import { PinBubbles, PinKeyboard } from '../component/pin-entry'; | ||
|
|
||
| // | ||
| // Password View (Mobile) | ||
| // | ||
|
|
||
| const styles = StyleSheet.create({ | ||
| content: { | ||
| paddingLeft: 20, | ||
| paddingRight: 20, | ||
| }, | ||
| boltWrapper: { | ||
| marginTop: 50, | ||
| }, | ||
| wordWrapper: { | ||
| marginTop: 35, | ||
| }, | ||
| bubbles: { | ||
| marginTop: 10, | ||
| }, | ||
| }); | ||
|
|
||
| const PasswordView = ({ store, wallet }) => ( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks good! |
||
| <Background image="purple-gradient-bg"> | ||
| <MainContent style={styles.content}> | ||
| <View style={styles.boltWrapper}> | ||
| <BoltIcon height={64 * 1.3} width={126 * 1.3} /> | ||
| </View> | ||
| <View style={styles.wordWrapper}> | ||
| <LightningWord height={31.2} width={245.7} /> | ||
| </View> | ||
| <FormStretcher> | ||
| <Text>Unlock with your pin</Text> | ||
| <PinBubbles pin={store.wallet.password} style={styles.bubbles} /> | ||
| </FormStretcher> | ||
| <PinKeyboard | ||
| onInput={digit => wallet.pushPinDigit({ digit, param: 'password' })} | ||
| onBackspace={() => wallet.popPinDigit({ param: 'password' })} | ||
| /> | ||
| </MainContent> | ||
| </Background> | ||
| ); | ||
|
|
||
| PasswordView.propTypes = { | ||
| store: PropTypes.object.isRequired, | ||
| wallet: PropTypes.object.isRequired, | ||
| }; | ||
|
|
||
| export default observer(PasswordView); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test these new views by commenting out the
set passwordparts of the stack? I couldn't figure out any other way.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also tests the screen in the browser using regular storybook. But yes, I commented out the other screens to test the password view on mobile.