on master help sign in
fix conflict in Point.js
e4e6c6eAnthony Arroyo
src/components/SigilDownloader.js → src/components/DownloadSigilButton.jsrenamed+18−8
@@ -5,9 +5,13 @@ import { sigil, stringRenderer } from 'urbit-sigil-js';
5
5
6import { dataURItoBlob, loadImg, initCanvas } from 'lib/SigilDownloader';
6import { dataURItoBlob, loadImg, initCanvas } from 'lib/SigilDownloader';
7
7
8−import WithTooltip from 'components/WithTooltip';
8+import { DownloadButton } from 'components/Buttons';
9
9
10−export default function SigilDownloader({ point, children }) {
10+export default function DownloadSigilButton({
11+ point,
12+ children = 'Download Sigil',
13+ ...rest
14+}) {
11 const [downloaded, setDownloaded] = useState(false);
15 const [downloaded, setDownloaded] = useState(false);
12 const downloadSigil = () => {
16 const downloadSigil = () => {
13 const patp = ob.patp(point);
17 const patp = ob.patp(point);
@@ -24,7 +28,6 @@ export default function SigilDownloader({ point, children }) {
24 // make sigil svg and encoded into base64
28 // make sigil svg and encoded into base64
25 const svg = sigil({
29 const svg = sigil({
26 patp,
30 patp,
27− full: true,
28 renderer: stringRenderer,
31 renderer: stringRenderer,
29 size: _size,
32 size: _size,
30 colors: ['#FFFFFF', '#000000'],
33 colors: ['#FFFFFF', '#000000'],
@@ -52,11 +55,18 @@ export default function SigilDownloader({ point, children }) {
52 const canvasRef = useRef(null);
55 const canvasRef = useRef(null);
53
56
54 return (
57 return (
58+ <>
59+ <DownloadButton
60+ as="span"
61+ disabled={downloaded}
62+ onClick={downloadSigil}
63+ detail={
55− <WithTooltip content={downloaded ? 'Downloaded!' : 'Download'}>
64+ downloaded ? 'Downloaded!' : 'Download the sigil for this point'
65+ }
66+ {...rest}>
56− {React.Children.map(children, child =>
67+ {children}
57− React.cloneElement(child, { onClick: downloadSigil })
68+ </DownloadButton>
58− )}
59 <canvas style={{ display: 'none' }} ref={canvasRef} />
69 <canvas style={{ display: 'none' }} ref={canvasRef} />
60− </WithTooltip>
70+ </>
61 );
71 );
62}
72}
src/views/Activate/PassportTransfer.js+4−4
@@ -26,13 +26,13 @@ const labelForProgress = progress => {
26 if (progress <= 0) {
26 if (progress <= 0) {
27 return 'Verify Passport';
27 return 'Verify Passport';
28 } else if (progress <= TRANSACTION_PROGRESS.GENERATING) {
28 } else if (progress <= TRANSACTION_PROGRESS.GENERATING) {
29− return 'Generating Transactions...';
29+ return 'Generating Ethereum Transactions...';
30 } else if (progress <= TRANSACTION_PROGRESS.SIGNING) {
30 } else if (progress <= TRANSACTION_PROGRESS.SIGNING) {
31− return 'Signing Transactions...';
31+ return 'Signing Ethereum Transactions...';
32 } else if (progress <= TRANSACTION_PROGRESS.FUNDING) {
32 } else if (progress <= TRANSACTION_PROGRESS.FUNDING) {
33− return 'Funding Transactions...';
33+ return 'Funding Ethereum Transactions...';
34 } else if (progress <= TRANSACTION_PROGRESS.TRANSFERRING) {
34 } else if (progress <= TRANSACTION_PROGRESS.TRANSFERRING) {
35− return 'Transferring Point...';
35+ return 'Transferring ID...';
36 } else if (progress <= TRANSACTION_PROGRESS.CLEANING) {
36 } else if (progress <= TRANSACTION_PROGRESS.CLEANING) {
37 return 'Cleaning Up...';
37 return 'Cleaning Up...';
38 } else if (progress <= TRANSACTION_PROGRESS.DONE) {
38 } else if (progress <= TRANSACTION_PROGRESS.DONE) {
src/views/Admin/Reticket/ReticketExecute.js+4−4
@@ -26,13 +26,13 @@ const labelForProgress = progress => {
26 if (progress <= 0) {
26 if (progress <= 0) {
27 return 'Starting...';
27 return 'Starting...';
28 } else if (progress <= TRANSACTION_PROGRESS.GENERATING) {
28 } else if (progress <= TRANSACTION_PROGRESS.GENERATING) {
29− return 'Generating Transactions...';
29+ return 'Generating Ethereum Transactions...';
30 } else if (progress <= TRANSACTION_PROGRESS.SIGNING) {
30 } else if (progress <= TRANSACTION_PROGRESS.SIGNING) {
31− return 'Signing Transactions...';
31+ return 'Signing Ethereum Transactions...';
32 } else if (progress <= TRANSACTION_PROGRESS.FUNDING) {
32 } else if (progress <= TRANSACTION_PROGRESS.FUNDING) {
33− return 'Funding Transactions...';
33+ return 'Funding Ethereum Transactions...';
34 } else if (progress <= TRANSACTION_PROGRESS.TRANSFERRING) {
34 } else if (progress <= TRANSACTION_PROGRESS.TRANSFERRING) {
35− return 'Transferring Point...';
35+ return 'Transferring ID...';
36 } else if (progress <= TRANSACTION_PROGRESS.CLEANING) {
36 } else if (progress <= TRANSACTION_PROGRESS.CLEANING) {
37 return 'Cleaning Up...';
37 return 'Cleaning Up...';
38 } else if (progress <= TRANSACTION_PROGRESS.DONE) {
38 } else if (progress <= TRANSACTION_PROGRESS.DONE) {
src/views/Point.js+3
@@ -11,6 +11,7 @@ import Greeting from 'components/Greeting';
11import Passport from 'components/Passport';
11import Passport from 'components/Passport';
12import { ForwardButton, BootArvoButton } from 'components/Buttons';
12import { ForwardButton, BootArvoButton } from 'components/Buttons';
13import { matchBlinky } from 'components/Blinky';
13import { matchBlinky } from 'components/Blinky';
14+import DownloadSigilButton from 'components/DownloadSigilButton';
14
15
15import * as need from 'lib/need';
16import * as need from 'lib/need';
16import useInvites from 'lib/useInvites';
17import useInvites from 'lib/useInvites';
@@ -122,6 +123,8 @@ export default function Point() {
122 )}
123 )}
123 <Grid.Item full as={BootArvoButton} />
124 <Grid.Item full as={BootArvoButton} />
124 <Grid.Divider />
125 <Grid.Divider />
126+ <Grid.Item full as={DownloadSigilButton} point={point} />
127+ <Grid.Divider />
125 </Grid>
128 </Grid>
126 </View>
129 </View>
127 );
130 );