on master help sign in
Adding initial Boot and Hosting view skeletons
commita785d7a4436dde5d20b487c070ed646685274b78 authorBrendan Hay <brendan.g.hay@gmail.com> dateSat 7 Dec 2019, 11:43 (7 years ago) parentee01fbf
5 files changed+45
src/lib/routeNames.js+1 src/lib/router.js+5 src/views/Boot.js+7 src/views/Hosting.js+7 src/views/Point.js+25
src/lib/routeNames.js+1
@@ -22,4 +22,5 @@ export const ROUTE_NAMES = {
2222 INVITE_COHORT: Symbol('INVITE_COHORT'),
2323 STAR_RELEASE: Symbol('STAR_RELEASE'),
2424 URBIT_OS: Symbol('URBIT_OS'),
25+ HOSTING: Symbol('HOSTING'),
2526};
src/lib/router.js+5
@@ -17,6 +17,9 @@ import AcceptTransfer from 'views/AcceptTransfer';
1717import CancelTransfer from 'views/CancelTransfer';
1818import UrbitOS from 'views/UrbitOS';
1919
20+import Boot from 'views/Boot';
21+import Hosting from 'views/Hosting';
22+
2023import { ROUTE_NAMES } from './routeNames';
2124
2225export const ROUTES = {
@@ -38,4 +41,6 @@ export const ROUTES = {
3841 [ROUTE_NAMES.STAR_RELEASE]: StarRelease,
3942 [ROUTE_NAMES.SIGIL_GENERATOR]: SigilGenerator,
4043 [ROUTE_NAMES.URBIT_OS]: UrbitOS,
44+ [ROUTE_NAMES.BOOT]: Boot,
45+ [ROUTE_NAMES.HOSTING]: Hosting,
4146};
src/views/Boot.jsnew file+7
@@ -0,0 +1,7 @@
1+import React from 'react';
2+
3+import View from 'components/View';
4+
5+export default function Boot() {
6+ return <View />;
7+}
src/views/Hosting.jsnew file+7
@@ -0,0 +1,7 @@
1+import React from 'react';
2+
3+import View from 'components/View';
4+
5+export default function Hosting() {
6+ return <View />;
7+}
src/views/Point.js+25
@@ -15,6 +15,9 @@ import Blinky from 'components/Blinky';
1515import BarGraph from 'components/BarGraph';
1616import Chip from 'components/Chip';
1717import InviteSigilList from 'components/InviteSigilList';
18+import CopyButton from 'components/CopyButton';
19+import { matchBlinky } from 'components/Blinky';
20+import DownloadSigilButton from 'components/DownloadSigilButton';
1821
1922import * as need from 'lib/need';
2023import useInvites from 'lib/useInvites';
@@ -87,6 +90,8 @@ export default function Point() {
8790
8891 const [showInviteForm, setShowInviteForm] = useState(false);
8992
93+ const goBoot = useCallback(() => push(names.BOOT), [push, names]);
94+
9095 const inviteButton = (() => {
9196 if (azimuth.getPointSize(point) === azimuth.PointSize.Star) {
9297 return (
@@ -248,6 +253,26 @@ export default function Point() {
248253 </>
249254 )}
250255 {senateButton}
256+ <Grid.Item
257+ full
258+ as={ForwardButton}
259+ detail="Boot your computer"
260+ onClick={goBoot}>
261+ Boot Urbit OS
262+ </Grid.Item>
263+ <Grid.Divider />
264+ <Grid.Item
265+ full
266+ as={ForwardButton}
267+ accessory={code && <CopyButton text={code} />}
268+ detail={code || notice}
269+ disabled={!code}
270+ detailClassName="mono">
271+ Login Code
272+ </Grid.Item>
273+ <Grid.Divider />
274+ <Grid.Item full as={DownloadSigilButton} point={point} />
275+ <Grid.Divider />
251276 </Grid>
252277 </View>
253278 );