on master help sign in
Merge pull request #904 from urbit/james/more-copyfixes

bridge: more copyfixes

commitc36c75ebce3d810b3ac9056895b36795478dc42d authornerveharp <748181+nerveharp@users.noreply.github.com> dateWed 2 Feb 2022, 13:22 (5 years ago) parent83964389d8706c
4 files changed+53−29
src/views/Activate/ActivateView.tsx+1−10 src/views/Activate/MasterKeyTransfer.tsx+3−3 src/views/UrbitOS/NetworkKeys.scss+10−10 src/views/UrbitOS/NetworkKeys.tsx+39−6
src/views/Activate/ActivateView.tsx+1−10
@@ -32,16 +32,7 @@ export default function ActivateView({
3232
3333 return (
3434 <Grid>
35− <Grid.Item
36− full
37− as={Text}
38− className="flex justify-center mt9 mb7 w-max-mobile">
39− <Grid.Item as={Text}>Bridge /&nbsp;</Grid.Item>
40− <Grid.Item className="fw-bold" as={Text}>
41− Activate
42− </Grid.Item>
43− </Grid.Item>
44− <Grid.Item>
35+ <Grid.Item className="mt10">
4536 {!hideBack && (
4637 <HeaderButton
4738 className="mb4"
src/views/Activate/MasterKeyTransfer.tsx+3−3
@@ -113,9 +113,9 @@ const MasterKeyTransfer = () => {
113113 <p
114114 className="mb2 sans gray5"
115115 style={{ fontSize: 14, textAlign: 'center' }}>
116− You need your bootkey to boot your Urbit ID. You can find your bootkey
117− inside the Passport you downloaded. A computer running on the Urbit
118− network is called a ship.
116+ You need your Network Key to boot your Urbit ID. You can find your
117+ Network Key file inside the Passport you downloaded. A computer
118+ running on the Urbit network is called a ship.
119119 </p>
120120 </Box>
121121 );
src/views/UrbitOS/NetworkKeys.scss+10−10
@@ -6,6 +6,12 @@
66 .body-pane {
77 height: 360px;
88
9+ .download {
10+ height: 24px;
11+ width: 24px;
12+ margin: 0 auto 22px;
13+ }
14+
915 .download-message {
1016 align-items: center;
1117 width: 350px;
@@ -15,12 +21,6 @@
1521 letter-spacing: 0em;
1622 text-align: center;
1723 margin: 90px auto 40px;
18−
19− .download {
20− height: 24px;
21− width: 24px;
22− margin-bottom: 22px;
23− }
2424 }
2525
2626 .contents {
@@ -29,24 +29,24 @@
2929 display: flex;
3030 flex-direction: column;
3131 justify-content: space-between;
32−
32+
3333 .check-row {
3434 margin-top: 8px;
3535 font-weight: 500;
36−
36+
3737 .checkbox {
3838 border-radius: $medium-border-radius;
3939 height: 16px;
4040 width: 16px;
4141 margin-right: 14px;
42−
42+
4343 svg {
4444 height: 18px;
4545 width: 18px;
4646 }
4747 }
4848 }
49−
49+
5050 .info-text {
5151 color: $dark-gray;
5252 margin: 8px 0px 24px 32px;
src/views/UrbitOS/NetworkKeys.tsx+39−6
@@ -9,7 +9,7 @@ import { Just } from 'folktale/maybe';
99import { Grid, Button } from 'indigo-react';
1010import * as azimuth from 'azimuth-js';
1111import { randomHex } from 'web3-utils';
12−import { Box, Checkbox, Icon, Row } from '@tlon/indigo-react';
12+import { Box, Checkbox, Icon, Row, Text } from '@tlon/indigo-react';
1313
1414import { usePointCache } from 'store/pointCache';
1515import { useNetwork } from 'store/network';
@@ -280,8 +280,40 @@ export default function UrbitOSNetworkKeys({
280280 ? 'Set Network Keys'
281281 : 'Initiate Network Keys';
282282
283− const usageMessage =
284− 'With your new network keys, you also have a new keyfile. Download your new keyfile to boot your OS.';
283+ const bootMessage = () => (
284+ <Text as="p" textAlign={'center'}>
285+ Download your new Network Key to boot your ship. Be sure to delete your
286+ old pier before booting with this new key.
287+ </Text>
288+ );
289+
290+ const resetMessage = () => (
291+ <>
292+ <Text as="p" textAlign={'center'}>
293+ Copy the contents of the Network Key file and run
294+ </Text>
295+ <Text
296+ as="code"
297+ mono
298+ bg={'washedGray'}
299+ padding={2}
300+ borderRadius={2}
301+ textAlign={'center'}>
302+ |rekey 'keyfile_contents'
303+ </Text>
304+ <Text as="p" textAlign={'center'}>
305+ using the dojo on your running ship.
306+ </Text>
307+ </>
308+ );
309+
310+ const waitMessage = () => (
311+ <Text as="p" textAlign={'center'}>
312+ <strong>Important:</strong> you will need to wait until the next L2 batch
313+ is submitted to the roller to boot your ship. If you do not wait, then you
314+ will not be able to boot your ship.
315+ </Text>
316+ );
285317
286318 const buttonText = `${hasKeys ? 'Reset' : 'Set'} Network Keys`;
287319
@@ -295,9 +327,10 @@ export default function UrbitOSNetworkKeys({
295327 <BodyPane>
296328 {isComplete && (
297329 <Box className="flex-col col justify-between h-full">
298− <Box className="flex-col download-message">
330+ <Box className="flex-col h-full justify-center">
299331 <Icon icon="Download" className="download" />
300− <Box>{usageMessage}</Box>
332+ {breach ? bootMessage() : resetMessage()}
333+ {breach && point.isL2 ? waitMessage() : null}
301334 </Box>
302335 {point.isL2 ? (
303336 <Grid.Item
@@ -306,7 +339,7 @@ export default function UrbitOSNetworkKeys({
306339 solid
307340 center
308341 onClick={keyfileBind.download}>
309− Download Keyfile
342+ Download Network Key
310343 </Grid.Item>
311344 ) : (
312345 <Grid.Item