on master help sign in
ux: add Download Keys button to Urbit OS index
commit91f4a7a59f14a8c6672433bc94ae735c05d4d6d7 authortomholford <tomholford@users.noreply.github.com> dateWed 14 Jul 2021, 10:30 (5 years ago) parent7570747
1 file changed+17−2
src/views/UrbitOS/Home.tsx+17−2
src/views/UrbitOS/Home.tsx+17−2
@@ -14,6 +14,8 @@ import NetworkingKeys from 'components/NetworkingKeys';
1414import { useLocalRouter } from 'lib/LocalRouter';
1515import { PointDetails } from 'types/pointDetailsType';
1616import AlertBox from 'components/AlertBox';
17+import DownloadKeyfileButton from 'components/DownloadKeyfileButton';
18+import useKeyfileGenerator from 'lib/useKeyfileGenerator';
1719
1820export default function UrbitOSHome({ manualNetworkSeed }) {
1921 const { pointCursor } = usePointCursor();
@@ -44,6 +46,9 @@ export default function UrbitOSHome({ manualNetworkSeed }) {
4446 push,
4547 names,
4648 ]);
49+
50+ const { bind: keyBind } = useKeyfileGenerator();
51+
4752 return (
4853 <>
4954 <Grid>
@@ -64,7 +69,17 @@ export default function UrbitOSHome({ manualNetworkSeed }) {
6469 </Grid.Item>
6570 </>
6671 )}
67−
72+ {hasSetNetworkingKeys && (
73+ <>
74+ <Grid.Divider />
75+ <Grid.Item
76+ full
77+ detail="A keyfile is used to boot your Urbit OS"
78+ as={DownloadKeyfileButton}
79+ {...keyBind}
80+ />
81+ </>
82+ )}
6883 <Grid.Divider />
6984 <Grid.Item full as={ForwardButton} onClick={goNetworkingKeys}>
7085 {networkKeysAction} Networking Keys
@@ -75,7 +90,7 @@ export default function UrbitOSHome({ manualNetworkSeed }) {
7590 <Grid.Item
7691 full
7792 as={ForwardButton}
78− accessory={showKeys ? '▼' : '▲'}
93+ accessory={showKeys ? '▲' : '▼'}
7994 onClick={toggleShowKeys}>
8095 View Networking Keys
8196 </Grid.Item>