on master help sign in
Sigil redesign and L1 sponsorship
f3eb799Will Galebach
src/components/Greeting.js+1−1
@@ -24,7 +24,7 @@ export default function ActivateDisclaimer({ point }) {
24 <Grid gap={4} className="mb10">
24 <Grid gap={4} className="mb10">
25 <Grid.Item full>
25 <Grid.Item full>
26 <Text className={cn(TEXT_STYLE, 'block mb4')}>
26 <Text className={cn(TEXT_STYLE, 'block mb4')}>
27− Welcome <code>{pointName}</code>,
27+ Welcome <span className="mono">{pointName}</span>,
28 </Text>
28 </Text>
29
29
30 <Text className={cn(TEXT_STYLE, 'block mb2')}>
30 <Text className={cn(TEXT_STYLE, 'block mb2')}>
src/components/L2/Dropdowns/AccountsDropdown.tsx+6−1
@@ -76,6 +76,11 @@ const AccountsDropdown = ({ showMigrate = false }: AccountsDropdownProps) => {
76 const displayText =
76 const displayText =
77 point.value >= 0 ? point.patp : currentAddress.slice(0, 6);
77 point.value >= 0 ? point.patp : currentAddress.slice(0, 6);
78
78
79+ const displayedPoints = useMemo(
80+ () => pointList.filter(({ ownManageSpawn }) => ownManageSpawn),
81+ [pointList]
82+ );
83+
79 return (
84 return (
80 <Dropdown
85 <Dropdown
81 className="accounts-dropdown"
86 className="accounts-dropdown"
@@ -90,7 +95,7 @@ const AccountsDropdown = ({ showMigrate = false }: AccountsDropdownProps) => {
90 </CopiableAddressWrap>
95 </CopiableAddressWrap>
91 <Box className="divider" />
96 <Box className="divider" />
92 <Box className="points">
97 <Box className="points">
93− {pointList.map(({ value, layer, patp }) => (
98+ {displayedPoints.map(({ value, layer, patp }) => (
94 <Row
99 <Row
95 className={`entry point ${value === point.value ? 'selected' : ''}`}
100 className={`entry point ${value === point.value ? 'selected' : ''}`}
96 onClick={selectPoint(value)}
101 onClick={selectPoint(value)}
src/components/L2/LoadingOverlay.tsx+1−1
@@ -17,7 +17,7 @@ const LoadingOverlay = ({
17 <Box className="loading-overlay">
17 <Box className="loading-overlay">
18 <Box className={`${text ? 'solid' : ''}`}>
18 <Box className={`${text ? 'solid' : ''}`}>
19 {!!text && <Box className="loader-text">{text}</Box>}
19 {!!text && <Box className="loader-text">{text}</Box>}
20− <LoadingSpinner foreground="rgba(0,0,0,0.3)" background="white" />
20+ <LoadingSpinner background="rgba(0,0,0,0.3)" foreground="white" />
21 </Box>
21 </Box>
22 </Box>
22 </Box>
23 );
23 );
src/lib/router.js+1−1
@@ -22,7 +22,7 @@ import PartySetPoolSize from 'views/Party/PartySetPoolSize';
22import InviteCohort from 'views/Invite/Cohort';
22import InviteCohort from 'views/Invite/Cohort';
23import AcceptTransfer from 'views/AcceptTransfer';
23import AcceptTransfer from 'views/AcceptTransfer';
24import CancelTransfer from 'views/CancelTransfer';
24import CancelTransfer from 'views/CancelTransfer';
25−import Adopt from 'views/Adopt';
25+import Adopt from 'views/Ops/Adopt.tsx';
26import Bitcoin from 'views/Bitcoin/Bitcoin';
26import Bitcoin from 'views/Bitcoin/Bitcoin';
27import Xpub from 'views/Bitcoin/Xpub';
27import Xpub from 'views/Bitcoin/Xpub';
28import SignTransaction from 'views/Bitcoin/SignTransaction';
28import SignTransaction from 'views/Bitcoin/SignTransaction';
src/lib/types/Point.ts+4−5
@@ -109,6 +109,7 @@ export default class Point {
109 showInvites: boolean;
109 showInvites: boolean;
110 isDefault: boolean;
110 isDefault: boolean;
111 isPlaceholder: boolean;
111 isPlaceholder: boolean;
112+ ownManageSpawn: boolean;
112 shouldDisplay: boolean;
113 shouldDisplay: boolean;
113
114
114 constructor({
115 constructor({
@@ -174,13 +175,11 @@ export default class Point {
174 this.showInvites = this.canManage || this.canSpawn;
175 this.showInvites = this.canManage || this.canSpawn;
175 this.isDefault = value === -1;
176 this.isDefault = value === -1;
176 this.isPlaceholder = isPlaceholder;
177 this.isPlaceholder = isPlaceholder;
177− this.shouldDisplay =
178+ this.ownManageSpawn =
178 !this.isPlaceholder &&
179 !this.isPlaceholder &&
179 !this.isDefault &&
180 !this.isDefault &&
180− (this.isOwner ||
181− this.isSpawnProxy ||
182− this.isManagementProxy ||
181+ (this.isOwner || this.isSpawnProxy || this.isManagementProxy);
183− this.isTransferProxy);
182+ this.shouldDisplay = this.ownManageSpawn || this.isTransferProxy;
184 }
183 }
185
184
186 equals = (point: Point) => {
185 equals = (point: Point) => {
src/views/Adopt.js → src/views/Ops/Adopt.tsxrenamed+42−27
@@ -3,31 +3,35 @@ import { Grid } from 'indigo-react';
3import * as ob from 'urbit-ob';
3import * as ob from 'urbit-ob';
4import { ecliptic } from 'azimuth-js';
4import { ecliptic } from 'azimuth-js';
5
5
6−import View from 'components/View';
7−import InlineEthereumTransaction from 'components/InlineEthereumTransaction';
8−import ViewHeader from 'components/ViewHeader';
9−
10import { useNetwork } from 'store/network';
6import { useNetwork } from 'store/network';
11import { usePointCache } from 'store/pointCache';
7import { usePointCache } from 'store/pointCache';
12import { usePointCursor } from 'store/pointCursor';
8import { usePointCursor } from 'store/pointCursor';
13import { useHistory } from 'store/history';
9import { useHistory } from 'store/history';
14
10
11+import * as need from 'lib/need';
15import { GAS_LIMITS } from 'lib/constants';
12import { GAS_LIMITS } from 'lib/constants';
16import useEthereumTransaction from 'lib/useEthereumTransaction';
13import useEthereumTransaction from 'lib/useEthereumTransaction';
17−import * as need from 'lib/need';
14+
15+import InlineEthereumTransaction from 'components/InlineEthereumTransaction';
16+import Window from 'components/L2/Window/Window';
17+import HeaderPane from 'components/L2/Window/HeaderPane';
18+import BodyPane from 'components/L2/Window/BodyPane';
19+import View from 'components/View';
20+import L2BackHeader from 'components/L2/Headers/L2BackHeader';
21+import { Row } from '@tlon/indigo-react';
18
22
19function useAdopt() {
23function useAdopt() {
20− const { contracts } = useNetwork();
24+ const { contracts }: any = useNetwork();
21 const _contracts = need.contracts(contracts);
25 const _contracts = need.contracts(contracts);
22
26
23− const { pointCursor } = usePointCursor();
27+ const { pointCursor }: any = usePointCursor();
24 const point = need.point(pointCursor);
28 const point = need.point(pointCursor);
25
29
26− const { syncResidents } = usePointCache();
30+ const { syncResidents }: any = usePointCache();
27
31
28 return useEthereumTransaction(
32 return useEthereumTransaction(
29 useCallback(
33 useCallback(
30− (adoptee, denied) =>
34+ (adoptee: number, denied: boolean) =>
31 denied
35 denied
32 ? ecliptic.reject(_contracts, adoptee)
36 ? ecliptic.reject(_contracts, adoptee)
33 : ecliptic.adopt(_contracts, adoptee),
37 : ecliptic.adopt(_contracts, adoptee),
@@ -39,7 +43,7 @@ function useAdopt() {
39}
43}
40
44
41export default function Adopt() {
45export default function Adopt() {
42− const { pop, data } = useHistory();
46+ const { pop, data }: any = useHistory();
43
47
44 const { adoptee, denied } = data;
48 const { adoptee, denied } = data;
45
49
@@ -51,12 +55,12 @@ export default function Adopt() {
51 () =>
55 () =>
52 denied ? (
56 denied ? (
53 <>
57 <>
54− {completed ? 'Denied' : 'Denying'} adoption request to{' '}
58+ {completed ? 'Rejected' : 'Rejecting'} adoption request for{' '}
55 <span className="mono">{patp}</span>
59 <span className="mono">{patp}</span>
56 </>
60 </>
57 ) : (
61 ) : (
58 <>
62 <>
59− {completed ? 'Approved' : 'Approving'} adoption request to{' '}
63+ {completed ? 'Approved' : 'Approving'} adoption request for{' '}
60 <span className="mono">{patp}</span>
64 <span className="mono">{patp}</span>
61 </>
65 </>
62 ),
66 ),
@@ -67,22 +71,33 @@ export default function Adopt() {
67 construct(adoptee, denied);
71 construct(adoptee, denied);
68 }, [construct, adoptee, denied]);
72 }, [construct, adoptee, denied]);
69
73
74+ const headerText = `${denied ? 'Reject' : 'Approve'} Adoption Request`;
75+
70 return (
76 return (
77+ <View
78+ className="adopt-l1"
71− <View pop={() => pop()} inset>
79+ pop={pop}
72− <Grid>
80+ inset
73− <Grid.Item full as={ViewHeader} className="mb2">
81+ hideBack
74− Adopt
82+ header={<L2BackHeader hideBalance back={pop} />}>
75− </Grid.Item>
83+ <Window>
84+ <HeaderPane>
85+ <Row className="header-row">
86+ <h5>{headerText}</h5>
87+ </Row>
88+ </HeaderPane>
89+ <BodyPane>
76− <Grid.Item full className="gray4 f5 mv2">
90+ <Grid.Item className="f5 mv2 w-full" style={{ fontSize: 14 }}>
77− {body}
91+ {body}
78− </Grid.Item>
92+ </Grid.Item>
79− <Grid.Item
93+ <Grid.Item
80− full
94+ full
81− {...bind}
95+ {...bind}
82− as={InlineEthereumTransaction}
96+ as={InlineEthereumTransaction}
83− onReturn={() => pop()}
97+ onReturn={() => pop()}
84− />
98+ />
85− </Grid>
99+ </BodyPane>
100+ </Window>
86 </View>
101 </View>
87 );
102 );
88}
103}
src/views/Ops/Requests.tsx+40−14
@@ -4,11 +4,11 @@ import { Ship } from '@urbit/roller-api';
4
4
5import { useRollerStore } from 'store/rollerStore';
5import { useRollerStore } from 'store/rollerStore';
6import useRoller from 'lib/useRoller';
6import useRoller from 'lib/useRoller';
7+import { useLocalRouter } from 'lib/LocalRouter';
7
8
8import Window from 'components/L2/Window/Window';
9import Window from 'components/L2/Window/Window';
9import HeaderPane from 'components/L2/Window/HeaderPane';
10import HeaderPane from 'components/L2/Window/HeaderPane';
10import BodyPane from 'components/L2/Window/BodyPane';
11import BodyPane from 'components/L2/Window/BodyPane';
11−import { useLocalRouter } from 'lib/LocalRouter';
12import View from 'components/View';
12import View from 'components/View';
13import L2BackHeader from 'components/L2/Headers/L2BackHeader';
13import L2BackHeader from 'components/L2/Headers/L2BackHeader';
14
14
@@ -16,7 +16,7 @@ import { RequestRow } from './RequestRow';
16import './Requests.scss';
16import './Requests.scss';
17
17
18export const Requests = () => {
18export const Requests = () => {
19− const { pop }: any = useLocalRouter();
19+ const { pop, push, names }: any = useLocalRouter();
20 const { point, setLoading } = useRollerStore();
20 const { point, setLoading } = useRollerStore();
21 const { api, changeSponsorship } = useRoller();
21 const { api, changeSponsorship } = useRoller();
22 const [requestingPoints, setRequestingPoints] = useState<Ship[]>([]);
22 const [requestingPoints, setRequestingPoints] = useState<Ship[]>([]);
@@ -32,24 +32,50 @@ export const Requests = () => {
32 setLoading(false);
32 setLoading(false);
33 }, [api, point, setLoading]);
33 }, [api, point, setLoading]);
34
34
35+ const acceptL1 = useCallback(
36+ adoptee =>
37+ push(names.ADOPT, {
38+ adoptee,
39+ denied: false,
40+ }),
41+ [push, names]
42+ );
43+
44+ const rejectL1 = useCallback(
45+ adoptee =>
46+ push(names.ADOPT, {
47+ adoptee,
48+ denied: true,
49+ }),
50+ [push, names]
51+ );
52+
35 const handleAcceptClick = useCallback(
53 const handleAcceptClick = useCallback(
36− async (point: Ship) => {
54+ async (ship: Ship) => {
55+ if (point.isL1) {
56+ acceptL1(ship);
57+ } else {
37− setLoading(true);
58+ setLoading(true);
38− await changeSponsorship(point, 'adopt');
59+ await changeSponsorship(ship, 'adopt');
39− await fetchRequests();
60+ await fetchRequests();
40− setLoading(false);
61+ setLoading(false);
62+ }
41 },
63 },
42− [changeSponsorship, fetchRequests, setLoading]
64+ [point, acceptL1, changeSponsorship, fetchRequests, setLoading]
43 );
65 );
44
66
45 const handleRejectClick = useCallback(
67 const handleRejectClick = useCallback(
46− async (point: Ship) => {
68+ async (ship: Ship) => {
69+ if (point.isL1) {
70+ rejectL1(ship);
71+ } else {
47− setLoading(true);
72+ setLoading(true);
48− await changeSponsorship(point, 'reject');
73+ await changeSponsorship(ship, 'reject');
49− await fetchRequests();
74+ await fetchRequests();
50− setLoading(false);
75+ setLoading(false);
76+ }
51 },
77 },
52− [changeSponsorship, fetchRequests, setLoading]
78+ [point, rejectL1, changeSponsorship, fetchRequests, setLoading]
53 );
79 );
54
80
55 useEffect(() => {
81 useEffect(() => {
src/views/Ops/ResidentRow.tsx+24−18
@@ -4,6 +4,7 @@ import { Ship } from '@urbit/roller-api';
4import Sigil from 'components/Sigil';
4import Sigil from 'components/Sigil';
5import { useCallback, useRef, useState } from 'react';
5import { useCallback, useRef, useState } from 'react';
6import useOnClickOutside from 'lib/useOnClickOutside';
6import useOnClickOutside from 'lib/useOnClickOutside';
7+import { useRollerStore } from 'store/rollerStore';
7
8
8interface ResidentRowProps {
9interface ResidentRowProps {
9 point: Ship;
10 point: Ship;
@@ -11,6 +12,9 @@ interface ResidentRowProps {
11}
12}
12
13
13export const ResidentRow = ({ point, onKick }: ResidentRowProps) => {
14export const ResidentRow = ({ point, onKick }: ResidentRowProps) => {
15+ const {
16+ point: { isL2 },
17+ } = useRollerStore();
14 const [showDropdown, setShowDropdown] = useState<boolean>(false);
18 const [showDropdown, setShowDropdown] = useState<boolean>(false);
15 const dropdownRef = useRef<HTMLDivElement | null>(null);
19 const dropdownRef = useRef<HTMLDivElement | null>(null);
16
20
@@ -41,24 +45,26 @@ export const ResidentRow = ({ point, onKick }: ResidentRowProps) => {
41 </Box>
45 </Box>
42 <Box className={'patp'}>{ob.patp(point)}</Box>
46 <Box className={'patp'}>{ob.patp(point)}</Box>
43 </Box>
47 </Box>
48+ {isL2 && (
44− <Box className="button-wrapper" ref={dropdownRef}>
49+ <Box className="button-wrapper" ref={dropdownRef}>
45− <Icon
50+ <Icon
46− icon="Ellipsis"
51+ icon="Ellipsis"
47− size="18px"
52+ size="18px"
48− onClick={() => setShowDropdown(!showDropdown)}
53+ onClick={() => setShowDropdown(!showDropdown)}
49− />
54+ />
50− {showDropdown && (
55+ {showDropdown && (
51− <>
56+ <>
52− <Box
57+ <Box
53− className="close-background"
58+ className="close-background"
54− onClick={() => setShowDropdown(false)}
59+ onClick={() => setShowDropdown(false)}
55− />
60+ />
56− <Box className="kick-dropdown" onClick={handleKickClick}>
61+ <Box className="kick-dropdown" onClick={handleKickClick}>
57− <Text>Kick</Text>
62+ <Text>Kick</Text>
58− </Box>
63+ </Box>
59− </>
64+ </>
60− )}
65+ )}
61− </Box>
66+ </Box>
67+ )}
62 </li>
68 </li>
63 );
69 );
64};
70};
src/views/Point/IssueChild.tsx+1−2
@@ -178,7 +178,6 @@ export default function IssueChild() {
178 const onValues = useCallback(
178 const onValues = useCallback(
179 ({ valid, values }) => {
179 ({ valid, values }) => {
180 if (valid) {
180 if (valid) {
181− console.log('VALID')
182 construct(patp2dec(values.point), values.owner);
181 construct(patp2dec(values.point), values.owner);
183 } else {
182 } else {
184 unconstruct();
183 unconstruct();
@@ -225,7 +224,7 @@ export default function IssueChild() {
225 <BodyPane>
224 <BodyPane>
226 <Box className="inner-container">
225 <Box className="inner-container">
227 <BridgeForm
226 <BridgeForm
228− style={{ width: '100%' }}
227+ className="w-full"
229 validate={validate}
228 validate={validate}
230 onValues={onValues}>
229 onValues={onValues}>
231 {({ handleSubmit, values }: any) => (
230 {({ handleSubmit, values }: any) => (
src/views/Point/UrbitID.js+3−6
@@ -1,6 +1,7 @@
1import React from 'react';
1import React from 'react';
2
2
3import { useHistory } from 'store/history';
3import { useHistory } from 'store/history';
4+import { useRollerStore } from 'store/rollerStore';
4
5
5import useRouter from 'lib/useRouter';
6import useRouter from 'lib/useRouter';
6import { LocalRouterProvider } from 'lib/LocalRouter';
7import { LocalRouterProvider } from 'lib/LocalRouter';
@@ -35,6 +36,7 @@ const VIEWS = {
35
36
36export default function UrbitID() {
37export default function UrbitID() {
37 const history = useHistory();
38 const history = useHistory();
39+ const { point } = useRollerStore();
38
40
39 const { Route, ...router } = useRouter({
41 const { Route, ...router } = useRouter({
40 names: NAMES,
42 names: NAMES,
@@ -50,12 +52,7 @@ export default function UrbitID() {
50 pop={onBack}
52 pop={onBack}
51 inset
53 inset
52 hideBack
54 hideBack
53− header={
54− <L2BackHeader
55+ header={<L2BackHeader hideBalance={point.isL2} back={onBack} />}
55− hideBalance={router.peek().key === NAMES.HOME}
56− back={onBack}
57− />
58− }
59 className="urbit-id">
56 className="urbit-id">
60 <LocalRouterProvider value={router}>
57 <LocalRouterProvider value={router}>
61 <Route />
58 <Route />
src/views/UrbitID/ResetKeys/ResetDownload.js+1−1
@@ -20,7 +20,7 @@ export default function ReticketDownload({ newWallet }) {
20 const goVerify = useCallback(() => push(names.VERIFY), [push, names]);
20 const goVerify = useCallback(() => push(names.VERIFY), [push, names]);
21
21
22 return (
22 return (
23− <Grid className="mt4" style={{ width: '100%' }}>
23+ <Grid className="mt4 w-full">
24 <Grid.Item full as={Text}>
24 <Grid.Item full as={Text}>
25 Download the new passport, and keep it somewhere safe!
25 Download the new passport, and keep it somewhere safe!
26 </Grid.Item>
26 </Grid.Item>
src/views/UrbitID/ResetKeys/ResetVerify.js+1−1
@@ -37,7 +37,7 @@ export default function ResetVerify({ newWallet }) {
37 const goExecute = useCallback(() => push(names.EXECUTE), [push, names]);
37 const goExecute = useCallback(() => push(names.EXECUTE), [push, names]);
38
38
39 return (
39 return (
40− <Grid className="mt4" style={{ width: '100%' }}>
40+ <Grid className="mt4 w-full">
41 <Grid.Item full as={Text}>
41 <Grid.Item full as={Text}>
42 Verify New Master Ticket
42 Verify New Master Ticket
43 </Grid.Item>
43 </Grid.Item>
src/views/UrbitID/SetProxy.js+1−1
@@ -239,7 +239,7 @@ export default function SetProxy() {
239 </Row>
239 </Row>
240 </HeaderPane>
240 </HeaderPane>
241 <BodyPane>
241 <BodyPane>
242− <Grid style={{ width: '100%' }}>
242+ <Grid className="w-full">
243 {!completed && (
243 {!completed && (
244 <>
244 <>
245 <Grid.Item full as={Text} className="mb4 f5 gray4">
245 <Grid.Item full as={Text} className="mb4 f5 gray4">
src/views/UrbitID/SigilGenerator.js+66−58
@@ -17,6 +17,10 @@ import FormError from 'form/FormError';
17import SubmitButton from 'form/SubmitButton';
17import SubmitButton from 'form/SubmitButton';
18import { NumberInput } from 'form/Inputs';
18import { NumberInput } from 'form/Inputs';
19import ColorInput from 'form/ColorInput';
19import ColorInput from 'form/ColorInput';
20+import Window from 'components/L2/Window/Window';
21+import HeaderPane from 'components/L2/Window/HeaderPane';
22+import BodyPane from 'components/L2/Window/BodyPane';
23+import { Row } from '@tlon/indigo-react';
20
24
21const BG_COLORS = [
25const BG_COLORS = [
22 colors.black,
26 colors.black,
@@ -59,65 +63,69 @@ export default function SigilGenerator() {
59 [point, downloadSigil]
63 [point, downloadSigil]
60 );
64 );
61 return (
65 return (
62− <>
66+ <Window className="id-home">
67+ <HeaderPane>
68+ <Row className="header-row">
69+ <h5>Sigil</h5>
70+ </Row>
71+ </HeaderPane>
72+ <BodyPane>
63− <BridgeForm
73+ <BridgeForm
64− validate={validate}
74+ validate={validate}
65− initialValues={{
75+ initialValues={{
66− size: 256,
76+ size: 256,
67− fgColor: '#FFFFFF',
77+ fgColor: '#FFFFFF',
68− bgColor: '#000000',
78+ bgColor: '#000000',
69− }}
79+ }}
70− onSubmit={onSubmit}>
80+ onSubmit={onSubmit}>
71− {({ handleSubmit, values }) => (
81+ {({ handleSubmit, values }) => (
72− <Grid gap={6}>
82+ <Grid gap={6}>
73− <Grid.Item full className="f5">
74− Sigil
75− </Grid.Item>
76− <Grid.Item fourth={1}>
83+ <Grid.Item fourth={1}>
77− <Sigil
84+ <Sigil
78− size={50}
85+ size={50}
79− patp={ob.patp(point)}
86+ patp={ob.patp(point)}
80− colors={[values.bgColor, values.fgColor]}
87+ colors={[values.bgColor, values.fgColor]}
81− />
88+ />
82− </Grid.Item>
89+ </Grid.Item>
83
90
84− <Grid.Item full as={Flex} col>
91+ <Grid.Item full as={Flex} col>
85− <Flex.Item className="mb1">Urbit ID</Flex.Item>
92+ <Flex.Item className="mb1">Urbit ID</Flex.Item>
86− <Flex.Item className="mono">{ob.patp(point)}</Flex.Item>
93+ <Flex.Item className="mono">{ob.patp(point)}</Flex.Item>
87− </Grid.Item>
94+ </Grid.Item>
88− <Grid.Item
95+ <Grid.Item
89− fourth={1}
96+ fourth={1}
90− as={NumberInput}
97+ as={NumberInput}
91− name="size"
98+ name="size"
92− label="Size (px)"
99+ label="Size (px)"
93− />
100+ />
94− <Grid.Item
101+ <Grid.Item
95− full
102+ full
96− as={ColorInput}
103+ as={ColorInput}
97− name="bgColor"
104+ name="bgColor"
98− label="Background Color"
105+ label="Background Color"
99− colors={BG_COLORS}
106+ colors={BG_COLORS}
100− />
107+ />
101− <Grid.Item
108+ <Grid.Item
102− full
109+ full
103− as={ColorInput}
110+ as={ColorInput}
104− name="fgColor"
111+ name="fgColor"
105− label="Foreground Color"
112+ label="Foreground Color"
106− colors={FG_COLORS}
113+ colors={FG_COLORS}
107− />
114+ />
108− <Grid.Item
115+ <Grid.Item
109− full
116+ full
110− as={SubmitButton}
117+ as={SubmitButton}
111− handleSubmit={handleSubmit}
118+ handleSubmit={handleSubmit}
112− accessory="↓">
119+ center>
113− Download Sigil
120+ Download Sigil
114− </Grid.Item>
121+ </Grid.Item>
115− <Grid.Item full as={FormError} />
122+ <Grid.Item full as={FormError} />
116− </Grid>
123+ </Grid>
117− )}
124+ )}
118− </BridgeForm>
125+ </BridgeForm>
119
126
120− <canvas style={{ display: 'none' }} ref={canvasRef} />
127+ <canvas style={{ display: 'none' }} ref={canvasRef} />
121− </>
128+ </BodyPane>
129+ </Window>
122 );
130 );
123}
131}
src/views/UrbitID/Transfer.js+3−2
@@ -114,13 +114,14 @@ export default function AdminTransfer() {
114 </Row>
114 </Row>
115 </HeaderPane>
115 </HeaderPane>
116 <BodyPane>
116 <BodyPane>
117− <Grid style={{ width: '100%' }} full gap={1}>
117+ <Grid className="w-full" full gap={1}>
118 <BridgeForm validate={validate} onValues={onValues}>
118 <BridgeForm validate={validate} onValues={onValues}>
119 {({ handleSubmit, values }) => (
119 {({ handleSubmit, values }) => (
120 <>
120 <>
121 {!completed && (
121 {!completed && (
122 <Grid.Item full as={Text} className={cn('f5 wrap')}>
122 <Grid.Item full as={Text} className={cn('f5 wrap')}>
123− Transfer <code>{name}</code> to a new owner.
123+ Transfer <span className="mono">{name}</span> to a new
124+ owner.
124 </Grid.Item>
125 </Grid.Item>
125 )}
126 )}
126 {!completed && needLockupWarning && (
127 {!completed && needLockupWarning && (
src/views/UrbitOS/ChangeSponsor.js+4−3
@@ -232,7 +232,7 @@ function CurrentEscape({ onDone }) {
232 full
232 full
233 center
233 center
234 solid
234 solid
235− style={{ width: '100%' }}
235+ className="w-full"
236 onClick={cancelRequest}>
236 onClick={cancelRequest}>
237 {buttonText}
237 {buttonText}
238 </Grid.Item>
238 </Grid.Item>
@@ -251,13 +251,14 @@ function CurrentEscape({ onDone }) {
251}
251}
252
252
253export default function UrbitOSChangeSponsor() {
253export default function UrbitOSChangeSponsor() {
254+ const { pop } = useHistory();
254 const { point } = useRollerStore();
255 const { point } = useRollerStore();
255
256
256 const [requested, setRequested] = useState(point.escapeRequested);
257 const [requested, setRequested] = useState(point.escapeRequested);
257
258
258 const onDone = useCallback(() => {
259 const onDone = useCallback(() => {
259− setRequested(point.escapeRequested);
260+ point.isL1 ? pop() : setRequested(!requested);
260− }, [point, setRequested]);
261+ }, [point, pop, requested, setRequested]);
261
262
262 return requested ? (
263 return requested ? (
263 <CurrentEscape onDone={onDone} />
264 <CurrentEscape onDone={onDone} />