@@ -1,14 +1,20 @@
11import React, { useCallback, useState } from 'react';
2−import { Grid, Button, SelectInput, Flex, H5, Text } from 'indigo-react';
2+import { Grid, Button, SelectInput } from 'indigo-react';
33import * as ob from 'urbit-ob';
44
55import { usePointCursor } from 'store/pointCursor';
66import { usePointCache } from 'store/pointCache';
77
88import useCurrentPointName from 'lib/useCurrentPointName';
9+import useKeyfileGenerator from 'lib/useKeyfileGenerator';
910import * as need from 'lib/need';
1011
11−import { OutButton, ForwardButton } from 'components/Buttons';
12+import {
13+ OutButton,
14+ ForwardButton,
15+ BootUrbitOSButton,
16+} from 'components/Buttons';
17+import CopyButton from 'components/CopyButton';
1218import NetworkingKeys from 'components/NetworkingKeys';
1319
1420import BridgeForm from 'form/BridgeForm';
@@ -25,6 +31,8 @@ export default function UrbitOSHome() {
2531
2632 const sponsor = ob.patp(details.sponsor);
2733
34+ const { code, notice } = useKeyfileGenerator();
35+
2836 const [showKeys, setShowKeys] = useState(false);
2937 const toggleShowKeys = useCallback(() => setShowKeys(!showKeys), [
3038 setShowKeys,
@@ -42,7 +50,14 @@ export default function UrbitOSHome() {
4250 ]);
4351 return (
4452 <>
45− <Hosting />
53+ <Grid>
54+ <Grid.Item full className="mv7">
55+ Urbit OS
56+ </Grid.Item>
57+ <Grid.Divider />
58+ <Grid.Item full as={BootUrbitOSButton} />
59+ </Grid>
60+
4661 <Grid>
4762 <Grid.Item full className="mv7 f5">
4863 Network
@@ -58,6 +73,16 @@ export default function UrbitOSHome() {
5873 <span className="f7 bg-black white p1 ml2 r4">SPONSOR</span>
5974 </Grid.Item>
6075 <Grid.Divider />
76+ <Grid.Item
77+ full
78+ as={ForwardButton}
79+ accessory={code && <CopyButton text={code} />}
80+ detail={code || notice}
81+ disabled={!code}
82+ detailClassName="mono">
83+ Login Code
84+ </Grid.Item>
85+ <Grid.Divider />
6186 <Grid.Item full as={ForwardButton} onClick={goNetworkingKeys}>
6287 Reset Networking Keys
6388 </Grid.Item>
@@ -75,6 +100,7 @@ export default function UrbitOSHome() {
75100 );
76101}
77102
103+// eslint-disable-next-line
78104function Hosting() {
79105 const name = useCurrentPointName();
80106 const options = [{ text: 'Tlon', value: 'tlon' }];