Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions mobile/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { SecureStore, LocalAuthentication } from 'expo';
import { createStackNavigator, NavigationActions } from 'react-navigation';
import FontLoader from './component/font-loader';

import SelectSeedView from '../src/view/select-seed';
import SetPinView from '../src/view/set-pin-mobile';
import SetPinConfirmView from '../src/view/set-pin-confirm-mobile';
import SeedSuccessView from '../src/view/seed-success';
Expand Down Expand Up @@ -76,6 +77,10 @@ const auth = new AuthAction(
Alert
);

const SelectSeed = () => (
<SelectSeedView store={store} wallet={wallet} nav={nav} />
);

const SetPin = () => <SetPinView store={store} auth={auth} nav={nav} />;

const SetPinConfirm = () => (
Expand Down Expand Up @@ -132,6 +137,7 @@ const Pay = () => <PaymentView store={store} payment={payment} nav={nav} />;

const MainStack = createStackNavigator(
{
SelectSeed,
SetPin,
SetPinConfirm,
SeedSuccess,
Expand Down
19 changes: 16 additions & 3 deletions src/component/header.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react';
import { View, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
import { createStyles, maxWidth } from './media-query';
import Text from './text';
import { color } from './style';
import { color, breakWidth } from './style';

//
// Header
//

const styles = StyleSheet.create({
const baseStyles = {
header: {
height: 75,
flexDirection: 'row',
Expand All @@ -29,7 +30,19 @@ const styles = StyleSheet.create({
centerTitle: {
justifyContent: 'center',
},
});
};

const styles = createStyles(
baseStyles,

maxWidth(breakWidth, {
separator: {
shadowOffset: { width: 0, height: 0 },
borderBottomWidth: StyleSheet.hairlineWidth,
borderBottomColor: color.white,
},
})
);

export const Header = ({ style, children, color, shadow, separator }) => (
<View
Expand Down
21 changes: 18 additions & 3 deletions src/component/list.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { Component, PureComponent } from 'react';
import { View, ListView, TouchableOpacity, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
import { createStyles, maxWidth } from './media-query';
import Text from './text';
import ForwardIcon from '../asset/icon/forward';
import { color, font } from './style';
import { color, font, breakWidth } from './style';

//
// List Content
Expand Down Expand Up @@ -68,7 +69,7 @@ List.propTypes = {
// List Item
//

const itemStyles = StyleSheet.create({
const itemBaseStyles = {
item: {
alignSelf: 'stretch',
flexDirection: 'row',
Expand All @@ -78,7 +79,20 @@ const itemStyles = StyleSheet.create({
shadowOffset: { width: 0, height: 0.5 },
shadowColor: color.greyBorder,
},
});
};

const itemStyles = createStyles(
itemBaseStyles,

maxWidth(breakWidth, {
item: {
marginTop: 0,
shadowOffset: { width: 0, height: 0 },
borderBottomWidth: StyleSheet.hairlineWidth,
borderBottomColor: color.greyBorder,
},
})
);

export class ListItem extends PureComponent {
render() {
Expand Down Expand Up @@ -106,6 +120,7 @@ ListItem.propTypes = {
const headStyles = StyleSheet.create({
head: {
shadowOffset: { width: 0, height: 0 },
borderBottomWidth: 0,
},
});

Expand Down
4 changes: 3 additions & 1 deletion src/component/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const font = {
lineHeightXS: 14,
lineHeightS: 16,
lineHeightSub: 18,
lineHeightBase: 20,
lineHeightBase: 22,
lineHeightM: 22,
lineHeightL: 24,
lineHeightXXL: 60,
Expand All @@ -69,3 +69,5 @@ export const invisible = {
paddingLeft: 0,
paddingBottom: 0,
};

export const breakWidth = 400;
2 changes: 0 additions & 2 deletions src/component/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ Text.propTypes = {
const copyStyles = StyleSheet.create({
text: {
fontFamily: 'OpenSans Light',
fontSize: font.sizeBase,
lineHeight: 22,
},
});

Expand Down
4 changes: 2 additions & 2 deletions src/view/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createStyles, maxWidth } from '../component/media-query';
import Background from '../component/background';
import { CopyOnboardText } from '../component/text';
import MainContent from '../component/main-content';
import { color, invisible } from '../component/style';
import { color, invisible, breakWidth } from '../component/style';

const baseStyles = {
content: {
Expand Down Expand Up @@ -34,7 +34,7 @@ const baseStyles = {
const styles = createStyles(
baseStyles,

maxWidth(500, {
maxWidth(breakWidth, {
copy2: invisible,
})
);
Expand Down
42 changes: 30 additions & 12 deletions src/view/select-seed.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,61 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { View } from 'react-native';
import { createStyles, maxWidth } from '../component/media-query';
import { observer } from 'mobx-react';
import PropTypes from 'prop-types';
import Background from '../component/background';
import MainContent from '../component/main-content';
import { H1Text, CopyText } from '../component/text';
import { CopyOnboardText, Text } from '../component/text';
import { RadioButton, GlasButton } from '../component/button';
import { SettingItem } from '../component/list';
import { color } from '../component/style';
import { color, breakWidth } from '../component/style';

//
// Select Seed View
//

const styles = StyleSheet.create({
const baseStyles = {
content: {
justifyContent: 'center',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an issue with re-adding this line? Otherwise the content is not vertically centered for me on desktop:
recov_phrase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tanx That's my only question. Otherwise, I'm good to merge!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You guys keep resizing the window to these totally unrealistic sizes 😂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Lee's design...

bildschirmfoto 2018-11-13 um 10 56 44

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, I'm good to merge!

ok thanks 🙏

paddingLeft: 50,
paddingRight: 50,
paddingLeft: 20,
paddingRight: 20,
},
title: {
marginTop: 60,
textAlign: 'center',
},
copyTxt: {
textAlign: 'center',
marginTop: 10,
maxWidth: 450,
maxWidth: 300,
},
list: {
marginTop: 50,
width: 400,
},
});
};

const styles = createStyles(
baseStyles,

maxWidth(breakWidth, {
title: {
marginTop: 50,
},
list: {
width: undefined,
alignSelf: 'stretch',
},
})
);

const SelectSeedView = ({ store, wallet, nav }) => (
<Background color={color.blackDark}>
<MainContent style={styles.content}>
<H1Text>Recovery phrase?</H1Text>
<CopyText style={styles.copyTxt}>
<CopyOnboardText style={styles.title}>Recovery phrase?</CopyOnboardText>
<Text style={styles.copyTxt}>
If you already have a recovery phrase, you can use that now. Otherwise,
you should generate a new wallet.
</CopyText>
</Text>
<View style={styles.list}>
<SettingItem
name="Generate a new wallet"
Expand Down