Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 07978ca

Browse files
committed
Attempt at more polished UI.
1 parent fbaa8b4 commit 07978ca

File tree

2 files changed

+57
-62
lines changed

2 files changed

+57
-62
lines changed

src/view/pay-lightning-supply-amount-mobile.js

+31-33
Original file line numberDiff line numberDiff line change
@@ -6,71 +6,69 @@ import Background from '../component/background';
66
import MainContent from '../component/main-content';
77
import { NamedField, AmountInputField } from '../component/field';
88
import { Header, Title } from '../component/header';
9-
import { CancelButton, BackButton, SmallGlasButton } from '../component/button';
9+
import { CancelButton, Button, SmallGlasButton } from '../component/button';
1010
import Card from '../component/card';
1111
import LightningBoltIcon from '../asset/icon/lightning-bolt';
12-
import { FormStretcher } from '../component/form';
12+
import { FormStretcher, FormSubText } from '../component/form';
1313
import { BalanceLabel, BalanceLabelUnit } from '../component/label';
1414
import { color } from '../component/style';
1515

1616
const styles = StyleSheet.create({
1717
balance: {
18-
marginBottom: 10,
19-
},
20-
numeral: {
21-
color: color.blackText,
18+
marginTop: 15,
2219
},
2320
unit: {
2421
color: color.blackText,
2522
},
26-
totalLbl: {
27-
marginTop: 5,
28-
},
29-
note: {
30-
marginTop: 5,
31-
borderBottomWidth: 0,
23+
form: {
24+
paddingTop: 10,
25+
paddingBottom: 10,
3226
},
33-
confirmBtn: {
34-
marginTop: 20,
27+
subText: {
28+
paddingTop: 40,
29+
paddingBottom: 40,
3530
},
3631
});
3732

3833
const PayLightningSupplyAmountView = ({ store, nav, payment }) => (
3934
<Background color={color.purple}>
4035
<Header color={color.purple}>
41-
<BackButton onPress={() => nav.goPay()} />
42-
<Title title="Supply Lightning Payment Amount">
36+
<Button disabled onPress={() => {}} />
37+
<Title title="Payment Request For Any Amount">
4338
<LightningBoltIcon height={12} width={6.1} />
4439
</Title>
4540
<CancelButton onPress={() => nav.goHome()} />
4641
</Header>
4742
<MainContent>
48-
<Card>
49-
<FormStretcher>
50-
<BalanceLabel style={styles.balance}>
51-
<AmountInputField
52-
style={styles.amountInput}
53-
autoFocus={true}
54-
value={store.payment.amount}
55-
onChangeText={amount => payment.setAmount({ amount })}
56-
onSubmitEditing={() =>
57-
payment.estimateLightningFeeForAmount(payment.amount)
58-
}
59-
/>
60-
<BalanceLabelUnit style={styles.unit}>
61-
{store.unitFiatLabel}
62-
</BalanceLabelUnit>
63-
</BalanceLabel>
43+
<Card style={styles.card}>
44+
<BalanceLabel style={styles.balance}>
45+
<AmountInputField
46+
autoFocus={true}
47+
value={store.invoice.amount}
48+
onChangeText={amount => payment.setAmount({ amount })}
49+
onSubmitEditing={() =>
50+
payment.estimateLightningFeeForAmount(payment.amount)
51+
}
52+
/>
53+
<BalanceLabelUnit style={styles.unit}>
54+
{store.unitFiatLabel}
55+
</BalanceLabelUnit>
56+
</BalanceLabel>
57+
<FormStretcher style={styles.form}>
6458
{store.payment.note ? (
6559
<NamedField name="Note" style={styles.note}>
6660
{store.payment.note}
6761
</NamedField>
6862
) : null}
6963
</FormStretcher>
64+
<FormSubText style={styles.subText}>
65+
Payment Request did not specify an amount. This is often used for
66+
tips/donations.
67+
</FormSubText>
7068
</Card>
7169
</MainContent>
7270
<SmallGlasButton onPress={() => nav.goPayLightningConfirm()}>
73-
Confirm
71+
Pay
7472
</SmallGlasButton>
7573
</Background>
7674
);

src/view/pay-lightning-supply-amount.js

+26-29
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ import Background from '../component/background';
66
import MainContent from '../component/main-content';
77
import { NamedField, AmountInputField } from '../component/field';
88
import { Header, Title } from '../component/header';
9-
import {
10-
MaxButton,
11-
CancelButton,
12-
BackButton,
13-
PillButton,
14-
} from '../component/button';
9+
import { CancelButton, BackButton, PillButton } from '../component/button';
1510
import Card from '../component/card';
1611
import LightningBoltIcon from '../asset/icon/lightning-bolt';
17-
import { FormStretcher, FormText } from '../component/form';
12+
import { FormStretcher, FormSubText } from '../component/form';
1813
import { BalanceLabel, BalanceLabelUnit } from '../component/label';
1914
import { color } from '../component/style';
2015

@@ -34,46 +29,48 @@ const styles = StyleSheet.create({
3429
marginTop: 20,
3530
backgroundColor: color.purple,
3631
},
32+
subText: {
33+
paddingTop: 20,
34+
paddingBottom: 40,
35+
paddingLeft: 40,
36+
paddingRight: 40,
37+
},
3738
});
3839

3940
const PayLightningSupplyAmountView = ({ store, nav, payment }) => (
4041
<Background image="purple-gradient-bg">
4142
<Header color={color.purple}>
4243
<BackButton onPress={() => nav.goHome()} />
43-
<Title title="Specify Amount to Send">
44+
<Title title="Payment Request For Any Amount">
4445
<LightningBoltIcon height={12} width={6.1} />
4546
</Title>
4647
<CancelButton onPress={() => nav.goHome()} />
4748
</Header>
4849
<MainContent>
4950
<Card>
50-
<FormText style={styles.description}>
51-
The invoice did not specify an amount.
52-
</FormText>
53-
<FormStretcher>
54-
<BalanceLabel style={styles.balance}>
55-
<AmountInputField
56-
autoFocus={true}
57-
value={store.payment.amount}
58-
onChangeText={amount => payment.setAmount({ amount })}
59-
onSubmitEditing={() =>
60-
payment.estimateLightningFeeForAmount(payment.amount)
61-
}
62-
/>
63-
<BalanceLabelUnit style={styles.unit}>
64-
{store.unitFiatLabel}
65-
</BalanceLabelUnit>
66-
</BalanceLabel>
67-
<MaxButton
68-
style={styles.maxBtn}
69-
active={store.payment.sendAll}
70-
onPress={() => payment.toggleMax()}
51+
<BalanceLabel style={styles.balance}>
52+
<AmountInputField
53+
autoFocus={true}
54+
value={store.payment.amount}
55+
onChangeText={amount => payment.setAmount({ amount })}
56+
onSubmitEditing={() =>
57+
payment.estimateLightningFeeForAmount(payment.amount)
58+
}
7159
/>
60+
<BalanceLabelUnit style={styles.unit}>
61+
{store.unitFiatLabel}
62+
</BalanceLabelUnit>
63+
</BalanceLabel>
64+
<FormStretcher>
7265
{store.payment.note ? (
7366
<NamedField name="Note" style={styles.note}>
7467
{store.payment.note}
7568
</NamedField>
7669
) : null}
70+
<FormSubText style={styles.subText}>
71+
Payment Request did not specify an amount. This is often used for
72+
tips/donations.
73+
</FormSubText>
7774
</FormStretcher>
7875
<PillButton
7976
style={styles.nextBtn}

0 commit comments

Comments
 (0)