@@ -1,14 +1,20 @@
1import React, { useCallback, useState } from 'react';
1import React, { useCallback, useState } from 'react';
2−import { Grid, Button, SelectInput, Flex, H5, Text } from 'indigo-react';
2+import { Grid, Button, SelectInput } from 'indigo-react';
3import * as ob from 'urbit-ob';
3import * as ob from 'urbit-ob';
5import { usePointCursor } from 'store/pointCursor';
5import { usePointCursor } from 'store/pointCursor';
6import { usePointCache } from 'store/pointCache';
6import { usePointCache } from 'store/pointCache';
8import useCurrentPointName from 'lib/useCurrentPointName';
8import useCurrentPointName from 'lib/useCurrentPointName';
9+import useKeyfileGenerator from 'lib/useKeyfileGenerator';
9import * as need from 'lib/need';
10import * as need from 'lib/need';
11−import { OutButton, ForwardButton } from 'components/Buttons';
16+} from 'components/Buttons';
17+import CopyButton from 'components/CopyButton';
12import NetworkingKeys from 'components/NetworkingKeys';
18import NetworkingKeys from 'components/NetworkingKeys';
14import BridgeForm from 'form/BridgeForm';
20import BridgeForm from 'form/BridgeForm';
@@ -25,6 +31,8 @@ export default function UrbitOSHome() {
26 const sponsor = ob.patp(details.sponsor);
32 const sponsor = ob.patp(details.sponsor);
34+ const { code, notice } = useKeyfileGenerator();
28 const [showKeys, setShowKeys] = useState(false);
36 const [showKeys, setShowKeys] = useState(false);
29 const toggleShowKeys = useCallback(() => setShowKeys(!showKeys), [
37 const toggleShowKeys = useCallback(() => setShowKeys(!showKeys), [
30 setShowKeys,
38 setShowKeys,
@@ -42,7 +50,14 @@ export default function UrbitOSHome() {
45− <Hosting />
53+ <Grid>
54+ <Grid.Item full className="mv7">
58+ <Grid.Item full as={BootUrbitOSButton} />
47 <Grid.Item full className="mv7 f5">
62 <Grid.Item full className="mv7 f5">
@@ -58,6 +73,16 @@ export default function UrbitOSHome() {
58 <span className="f7 bg-black white p1 ml2 r4">SPONSOR</span>
73 <span className="f7 bg-black white p1 ml2 r4">SPONSOR</span>
59 </Grid.Item>
74 </Grid.Item>
60 <Grid.Divider />
75 <Grid.Divider />
79+ accessory={code && <CopyButton text={code} />}
80+ detail={code || notice}
82+ detailClassName="mono">
61 <Grid.Item full as={ForwardButton} onClick={goNetworkingKeys}>
86 <Grid.Item full as={ForwardButton} onClick={goNetworkingKeys}>
62 Reset Networking Keys
87 Reset Networking Keys
63 </Grid.Item>
88 </Grid.Item>
@@ -75,6 +100,7 @@ export default function UrbitOSHome() {
103+// eslint-disable-next-line
78function Hosting() {
104function Hosting() {
79 const name = useCurrentPointName();
105 const name = useCurrentPointName();
80 const options = [{ text: 'Tlon', value: 'tlon' }];
106 const options = [{ text: 'Tlon', value: 'tlon' }];