on master help sign in
Merge branch 'mino' into feat/final-form
commit897e4e85a245f4edad3d107adcbde3ee5aa32e78 authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateThu 8 Aug 2019, 11:47 (7 years ago) parent91176c2ffd8b44
6 files changed+24−9
src/components/FooterButton.js+1−1 src/views/Activate/ActivateCode.js+15 src/views/Admin/AdminNetworkingKeys.js+1−1 src/views/Admin/AdminTransfer.js+1−1 src/views/Login.js+1−1 src/views/Points.js+5−5
src/components/FooterButton.js+1−1
@@ -6,7 +6,7 @@ import Footer from './Footer';
66export default function FooterButton({ as: As = Button, ...props }) {
77 return (
88 <Footer>
9− <Grid className="pt2">
9+ <Grid className="pt4">
1010 <Grid.Divider />
1111 <Grid.Item full>
1212 <As {...props} />
src/views/Activate/ActivateCode.js+15
@@ -21,6 +21,8 @@ import { useLocalRouter } from 'lib/LocalRouter';
2121import useImpliedTicket from 'lib/useImpliedTicket';
2222import timeout from 'lib/timeout';
2323import useHasDisclaimed from 'lib/useHasDisclaimed';
24+import useBreakpoints from 'lib/useBreakpoints';
25+import WarningBox from 'components/WarningBox';
2426
2527import BridgeForm from 'form/BridgeForm';
2628import SubmitButton from 'form/SubmitButton';
@@ -42,6 +44,12 @@ export default function ActivateCode() {
4244 derivedPoint,
4345 setDerivedPoint,
4446 } = useActivateFlow();
47+ // this is a pretty naive way to detect if we're on a mobile device
48+ // (i.e. we're checking the width of the screen)
49+ // but it will suffice for the 99% case and if someone wants to get around it
50+ // well by golly they're allowed to turn their phone into landscape mode
51+ // for this screen
52+ const activationAllowed = useBreakpoints([false, true, true]);
4553
4654 const goToLogin = useCallback(() => history.popAndPush(ROUTE_NAMES.LOGIN), [
4755 history,
@@ -129,6 +137,7 @@ export default function ActivateCode() {
129137 as={TicketInput}
130138 name="ticket"
131139 label="Activation Code"
140+ disabled={!activationAllowed}
132141 />
133142
134143 <Grid.Item full as={FormError} />
@@ -144,6 +153,12 @@ export default function ActivateCode() {
144153 ? 'Generating...'
145154 : 'Go'}
146155 </Grid.Item>
156+
157+ {!activationAllowed && (
158+ <Grid.Item full as={WarningBox} className="mt4">
159+ For your security, please access Bridge on a desktop device.
160+ </Grid.Item>
161+ )}
147162 </>
148163 )}
149164 </BridgeForm>
src/views/Admin/AdminNetworkingKeys.js+1−1
@@ -346,7 +346,7 @@ export default function AdminNetworkingKeys() {
346346 <Grid.Item full as={NoticeBox} className="mb2">
347347 When using a custom network seed, you'll need to download
348348 your Arvo keyfile immediately after this transaction is
349− completed—Multipass does not store your seed.
349+ Bridge does not store your seed.
350350 </Grid.Item>
351351 <Grid.Item
352352 full
src/views/Admin/AdminTransfer.js+1−1
@@ -82,7 +82,7 @@ export default function AdminTransfer() {
8282 green3: completed,
8383 })}>
8484 {completed
85− ? `${values.address} is now the Transfer Proxy for ${name} and can accept the transfer by logging into Multipass themselves. Until they accept your transfer, you will still have ownership over ${name}.`
85+ ? `${values.address} is now the Transfer Proxy for ${name} and can accept the transfer by logging into Bridge themselves. Until they accept your transfer, you will still have ownership over ${name}.`
8686 : `Transfer ${name} to a new owner.`}
8787 </Grid.Item>
8888
src/views/Login.js+1−1
@@ -116,7 +116,7 @@ export default function Login() {
116116 return (
117117 <View pop={pop} inset>
118118 <Grid>
119− <Grid.Item full as={Crumbs} routes={[{ text: 'Multipass' }]} />
119+ <Grid.Item full as={Crumbs} routes={[{ text: 'Bridge' }]} />
120120 <Grid.Item full as={H4} className="mt4">
121121 Login
122122 </Grid.Item>
src/views/Points.js+5−5
@@ -108,7 +108,7 @@ export default function Points() {
108108 })
109109 );
110110
111− const multipassPoints = [
111+ const allPoints = [
112112 ...ownedPoints.filter(p => !outgoingPoints.includes(p)),
113113 ...managingPoints,
114114 ...votingPoints,
@@ -116,7 +116,7 @@ export default function Points() {
116116 ];
117117
118118 const displayEmptyState =
119− !loading && incomingPoints.length === 0 && multipassPoints.length === 0;
119+ !loading && incomingPoints.length === 0 && allPoints.length === 0;
120120
121121 // sync display details for known points
122122 useSyncKnownPoints([
@@ -226,12 +226,12 @@ export default function Points() {
226226 </Grid.Item>
227227 )}
228228
229− {multipassPoints.length > 0 && (
229+ {allPoints.length > 0 && (
230230 <Grid.Item full as={Grid} gap={1}>
231231 <Grid.Item full as={H5}>
232− {pluralize(multipassPoints.length, 'Multipass', 'Multipasses')}
232+ {pluralize(allPoints.length, 'Point')}
233233 </Grid.Item>
234− <Grid.Item full as={PointList} points={multipassPoints} />
234+ <Grid.Item full as={PointList} points={allPoints} />
235235 </Grid.Item>
236236 )}
237237