on master help sign in
Remove superfluous {} around text in login flow
commitfaa39fb8a0bf3edc99434c61eb7f0d56dec99cf5 authorFang <git@fang.io> dateTue 25 Jun 2019, 16:23 (7 years ago) parent21e6c27
6 files changed+57−74
src/views/Login/Keystore.js+9−10 src/views/Login/Ledger.js+30−41 src/views/Login/PrivateKey.js+4−3 src/views/Login/Shards.js+4−4 src/views/Login/Ticket.js−1 src/views/Login/Trezor.js+10−15
src/views/Login/Keystore.js+9−10
@@ -76,27 +76,26 @@ export default function Keystore({ loginCompleted }) {
7676 decryptionProblem === false ? (
7777 <div />
7878 ) : (
79− <Warning className={'mt-8'}>
79+ <Warning className="mt-8">
8080 <H3 style={{ marginTop: 0, paddingTop: 0 }}>
81− {"Couldn't decrypt wallet."}
81+ Couldn't decrypt wallet.
8282 </H3>
83− {'You may have entered an incorrect password.'}
83+ You may have entered an incorrect password.
8484 </Warning>
8585 );
8686
8787 return (
8888 <View>
8989 <InputCaption>
90− {`Please upload your Ethereum keystore file. If your keystore
91− file is encrypted with a password, you'll also need to enter
92− that below.`}
90+ Please upload your Ethereum keystore file. If your keystore file is
91+ encrypted with a password, you'll also need to enter that below.
9392 </InputCaption>
9493
9594 <UploadButton
9695 className={`${uploadButtonClass} mt3`}
9796 onChange={handleKeystoreUpload}>
98− <div className={'flex-center-all fs-4 h-11 pointer'}>
99− {'Upload Keystore file'}
97+ <div className="flex-center-all fs-4 h-11 pointer">
98+ Upload Keystore file
10099 </div>
101100 </UploadButton>
102101
@@ -108,7 +107,7 @@ export default function Keystore({ loginCompleted }) {
108107 autoFocus></PassphraseInput>
109108
110109 <ForwardButton
111− className={`mt3`}
110+ className="mt3"
112111 disabled={Nothing.hasInstance(keystore)}
113112 onClick={constructWallet}>
114113 Decrypt
@@ -117,7 +116,7 @@ export default function Keystore({ loginCompleted }) {
117116 {decryptMessage}
118117
119118 <ForwardButton
120− className={'mt3'}
119+ className="mt3"
121120 disabled={Nothing.hasInstance(wallet)}
122121 onClick={loginCompleted}>
123122 Continue
src/views/Login/Ledger.js+30−41
@@ -69,10 +69,7 @@ export default function Ledger({ loginCompleted }) {
6969 const pathOptions = [
7070 { title: 'Ledger Live', value: LEDGER_LIVE_PATH },
7171 { title: 'Ledger Legacy', value: LEDGER_LEGACY_PATH },
72− {
73− title: 'Custom path',
74− value: 'custom',
75− },
72+ { title: 'Custom path', value: 'custom' },
7673 ];
7774 const basePathTitle = pathOptions.find(o => o.value === basePath).title;
7875
@@ -90,7 +87,7 @@ export default function Ledger({ loginCompleted }) {
9087 className="mt-8"
9188 options={pathOptions}
9289 handleUpdate={handlePathSelection}
93− title={'Derivation path'}
90+ title="Derivation path"
9491 currentSelectionTitle={basePathTitle}
9592 fullWidth={true}
9693 />
@@ -106,7 +103,7 @@ export default function Ledger({ loginCompleted }) {
106103 value={addHdPrefix(hdPath)}
107104 autocomplete="off"
108105 onChange={setHdPath}>
109− <InnerLabel>{'HD Path'}</InnerLabel>
106+ <InnerLabel>HD Path</InnerLabel>
110107 </Input>
111108 ) : (
112109 <InnerLabelDropdown
@@ -115,7 +112,7 @@ export default function Ledger({ loginCompleted }) {
115112 prop-format="innerLabel"
116113 options={accountOptions}
117114 handleUpdate={handleAccountSelection}
118− title={'Account'}
115+ title="Account"
119116 currentSelectionTitle={accountTitle}
120117 fullWidth={true}
121118 />
@@ -123,54 +120,46 @@ export default function Ledger({ loginCompleted }) {
123120
124121 return (
125122 <View>
126− <H1>{'Authenticate With Your Ledger'}</H1>
123+ <H1>Authenticate With Your Ledger</H1>
127124
128− <H2>{'Running on HTTPS?'}</H2>
125+ <H2>Running on HTTPS?</H2>
129126
130127 <P>
131− {`Connect and authenticate to your Ledger, and then open the
132− "Ethereum" application. If you're running on older firmware,
133− make sure the "browser support" option is turned on. To sign
134− transactions, you'll also need to enable the "contract data"
135− option.`}
128+ Connect and authenticate to your Ledger, and then open the "Ethereum"
129+ application. If you're running on older firmware, make sure the "browser
130+ support" option is turned on. To sign transactions, you'll also need to
131+ enable the "contract data" option.
136132 </P>
137133
138134 <P>
139− {`If you'd like to use a custom derivation path, you may enter
140− it below.`}
135+ If you'd like to use a custom derivation path, you may enter it below.
141136 </P>
142137
143− <H2>{'Running on HTTP?'}</H2>
138+ <H2>Running on HTTP?</H2>
144139
145− <P>{`To authenticate and sign transactions with a Ledger, Bridge
146− must be serving over HTTPS on localhost. You can do this via the
147− following:`}</P>
140+ <P>
141+ To authenticate and sign transactions with a Ledger, Bridge must be
142+ serving over HTTPS on localhost. You can do this via the following:
143+ </P>
148144
149− <ol className={'measure-md'}>
150− <li className={'mt-4'}>
151− {'Install'}{' '}
152− <a target={'_blank'} href={'https://github.com/FiloSottile/mkcert'}>
153− {'mkcert'}
145+ <ol className="measure-md">
146+ <li className="mt-4">
147+ Install
148+ <a target="_blank" href="https://github.com/FiloSottile/mkcert">
149+ mkcert
154150 </a>
155151 </li>
156− <li className={'mt-4'}>
157− {'Install a local certificate authority via '}
158− <code>{'mkcert -install'}</code>
152+ <li className="mt-4">
153+ Install a local certificate authority via <code>mkcert -install</code>
159154 </li>
160− <li className={'mt-4'}>
161− {'In your '}
162− <code>{'bridge'}</code>
163− {' directory, generate a certificate valid for localhost via '}{' '}
164− <code>{'mkcert localhost'}</code>
165− {'.'}
166− {'This will produce two files: '}
167− <code>{'localhost.pem'}</code> {', the local certificate, and '}
168− <code>{'localhost-key.pem'}</code>
169− {', its corresponding private key.'}
155+ <li className="mt-4">
156+ In your <code>bridge</code> directory, generate a certificate valid
157+ for localhost via <code>mkcert localhost</code>. This will produce two
158+ files: <code>localhost.pem</code>, the local certificate, and
159+ <code>localhost-key.pem</code> , its corresponding private key.
170160 </li>
171− <li className={'mt-4'}>
172− {'Run '}
173− <code>{'python bridge-https.py'}</code>
161+ <li className="mt-4">
162+ Run <code>python bridge-https.py</code>
174163 </li>
175164 </ol>
176165
src/views/Login/PrivateKey.js+4−3
@@ -38,12 +38,13 @@ export default function PrivateKey({ loginCompleted }) {
3838 initialValue={privateKey}
3939 onValue={handlePrivateKeyInput}
4040 autocomplete="off"
41− autoFocus></PassphraseInput>
41+ autoFocus
42+ />
4243 <ForwardButton
43− className={'mt3'}
44+ className="mt3"
4445 disabled={Nothing.hasInstance(wallet)}
4546 onClick={loginCompleted}>
46− {'Continue →'}
47+ Continue
4748 </ForwardButton>
4849 </View>
4950 );
src/views/Login/Shards.js+4−4
@@ -77,16 +77,16 @@ export default function Shards({ loginCompleted }) {
7777 onValue={setPassphrase}
7878 />
7979 <ForwardButton
80− className={'mt3'}
80+ className="mt3"
8181 disabled={!ready}
8282 onClick={walletFromShards}>
83− {'Unlock Wallet →'}
83+ Unlock Wallet
8484 </ForwardButton>
8585 <ForwardButton
86− className={'mt3'}
86+ className="mt3"
8787 disabled={Nothing.hasInstance(wallet)}
8888 onClick={loginCompleted}>
89− {'Continue →'}
89+ Continue
9090 </ForwardButton>
9191 </View>
9292 );
src/views/Login/Ticket.js−1
@@ -41,7 +41,6 @@ export default function Ticket({ advanced, loginCompleted }) {
4141 const [ticketStatus, setTicketStatus] = useState(Nothing());
4242
4343 useEffect(() => {
44− console.log('something changed?');
4544 verifyTicket(pointName, ticket, passphrase);
4645 return () => {};
4746 }, [pointName, ticket, passphrase]);
src/views/Login/Trezor.js+10−15
@@ -50,12 +50,7 @@ export default function Trezor({ loginCompleted }) {
5050 });
5151 };
5252
53− let accountOptions = [
54− {
55− title: 'Custom path',
56− value: 'custom',
57− },
58− ];
53+ let accountOptions = [{ title: 'Custom path', value: 'custom' }];
5954 for (let i = 0; i < 20; i++) {
6055 accountOptions.push({
6156 title: 'Account #' + (i + 1),
@@ -71,7 +66,7 @@ export default function Trezor({ loginCompleted }) {
7166 prop-format="innerLabel"
7267 options={accountOptions}
7368 handleUpdate={handleAccountSelection}
74− title={'Account'}
69+ title="Account"
7570 currentSelectionTitle={accountTitle}
7671 fullWidth={true}
7772 />
@@ -87,31 +82,31 @@ export default function Trezor({ loginCompleted }) {
8782 value={hdPath}
8883 autocomplete="off"
8984 onChange={setHdPath}>
90− <InnerLabel>{'HD Path'}</InnerLabel>
85+ <InnerLabel>HD Path</InnerLabel>
9186 </Input>
9287 );
9388
9489 return (
9590 <View>
96− <H1>{'Authenticate With Your Trezor'}</H1>
91+ <H1>Authenticate With Your Trezor</H1>
9792
9893 <P>
99− {`Connect and authenticate to your Trezor. If you'd like
100− to use a custom derivation path, you may enter it below.`}
94+ Connect and authenticate to your Trezor. If you'd like to use a custom
95+ derivation path, you may enter it below.
10196 </P>
10297
10398 {accountSelection}
10499 {pathSelection}
105100
106− <ForwardButton className={'mt3'} onClick={pollDevice}>
107− {'Authenticate'}
101+ <ForwardButton className="mt3" onClick={pollDevice}>
102+ Authenticate
108103 </ForwardButton>
109104
110105 <ForwardButton
111− className={'mt3'}
106+ className="mt3"
112107 disabled={Maybe.Nothing.hasInstance(wallet)}
113108 onClick={loginCompleted}>
114− {'Continue'}
109+ Continue
115110 </ForwardButton>
116111 </View>
117112 );