@@ -0,0 +1,82 @@
1+import * as need from 'lib/need';
2+import { Box, Row, Button, Icon } from '@tlon/indigo-react';
3+
4+import Window from 'components/L2/Window/Window';
5+import HeaderPane from 'components/L2/Window/HeaderPane';
6+import BodyPane from 'components/L2/Window/BodyPane';
7+import { useCallback } from 'react';
8+import { useLocalRouter } from 'lib/LocalRouter';
9+import { isGalaxy } from 'lib/utils/point';
10+import { usePointCursor } from 'store/pointCursor';
11+import View from 'components/View';
12+import L2BackHeader from 'components/L2/Headers/L2BackHeader';
13+
14+export const Ops = () => {
15+ const { pop, push, names }: any = useLocalRouter();
16+ const { pointCursor }: any = usePointCursor();
17+ const point = need.point(pointCursor);
18+
19+ const goSenate = useCallback(() => push(names.SENATE), [push, names]);
20+ const goResidents = useCallback(() => push(names.RESIDENTS), [push, names]);
21+ const goIssuePoint = useCallback(() => push(names.ISSUE_CHILD), [
22+ names.ISSUE_CHILD,
23+ push,
24+ ]);
25+
26+ return (
27+ <View
28+ id="ops"
29+ pop={pop}
30+ inset
31+ hideBack
32+ className="urbit-id"
33+ header={<L2BackHeader hideBalance back={pop} />}>
34+ <Window className="id-ops">
35+ <HeaderPane>
36+ <Row className="header-row">
37+ <h5>{isGalaxy(point) ? 'Galaxy' : 'Star'} Ops</h5>
38+ <Button onClick={goIssuePoint} className="header-button">
39+ <Icon icon="Node" /> Spawn
40+ {isGalaxy(point) ? 'Stars' : 'Planets'}
41+ </Button>
42+ </Row>
43+ </HeaderPane>
44+ <BodyPane>
45+ <Row className="between-row management">
46+ <Box>
47+ <Box>Residents</Box>
48+ <Box className="subtitle">Planets that you route packets for</Box>
49+ </Box>
50+ <Button className="secondary" onClick={goResidents}>
51+ View
52+ </Button>
53+ </Row>
54+ <Row className="between-row management">
55+ <Box>
56+ <Box>Requests</Box>
57+ <Box className="subtitle">
58+ Planets requesting your sponsorship
59+ </Box>
60+ </Box>
61+ <Button className="secondary" onClick={goResidents}>
62+ View
63+ </Button>
64+ </Row>
65+ {isGalaxy(point) && (
66+ <Row className="between-row management">
67+ <Box>
68+ <Box>Proposals</Box>
69+ <Box className="subtitle">
70+ View or vote on proposals in the Senate
71+ </Box>
72+ </Box>
73+ <Button className="secondary" onClick={goSenate}>
74+ View
75+ </Button>
76+ </Row>
77+ )}
78+ </BodyPane>
79+ </Window>
80+ </View>
81+ );
82+};