on master help sign in
fix conflict in Point.js
commite4e6c6ec729c376ac801f9812676ee8d102d9c3e authorAnthony Arroyo <anthony@tlon.io> dateWed 16 Oct 2019, 20:55 (7 years ago) parentc10a8ab663561c
4 files changed+29−16
src/components/SigilDownloader.js → src/components/DownloadSigilButton.js+18−8 src/views/Activate/PassportTransfer.js+4−4 src/views/Admin/Reticket/ReticketExecute.js+4−4 src/views/Point.js+3
src/components/SigilDownloader.js → src/components/DownloadSigilButton.jsrenamed+18−8
@@ -5,9 +5,13 @@ import { sigil, stringRenderer } from 'urbit-sigil-js';
55
66import { dataURItoBlob, loadImg, initCanvas } from 'lib/SigilDownloader';
77
8−import WithTooltip from 'components/WithTooltip';
8+import { DownloadButton } from 'components/Buttons';
99
10−export default function SigilDownloader({ point, children }) {
10+export default function DownloadSigilButton({
11+ point,
12+ children = 'Download Sigil',
13+ ...rest
14+}) {
1115 const [downloaded, setDownloaded] = useState(false);
1216 const downloadSigil = () => {
1317 const patp = ob.patp(point);
@@ -24,7 +28,6 @@ export default function SigilDownloader({ point, children }) {
2428 // make sigil svg and encoded into base64
2529 const svg = sigil({
2630 patp,
27− full: true,
2831 renderer: stringRenderer,
2932 size: _size,
3033 colors: ['#FFFFFF', '#000000'],
@@ -52,11 +55,18 @@ export default function SigilDownloader({ point, children }) {
5255 const canvasRef = useRef(null);
5356
5457 return (
55− <WithTooltip content={downloaded ? 'Downloaded!' : 'Download'}>
56− {React.Children.map(children, child =>
57− React.cloneElement(child, { onClick: downloadSigil })
58− )}
58+ <>
59+ <DownloadButton
60+ as="span"
61+ disabled={downloaded}
62+ onClick={downloadSigil}
63+ detail={
64+ downloaded ? 'Downloaded!' : 'Download the sigil for this point'
65+ }
66+ {...rest}>
67+ {children}
68+ </DownloadButton>
5969 <canvas style={{ display: 'none' }} ref={canvasRef} />
60− </WithTooltip>
70+ </>
6171 );
6272}
src/views/Activate/PassportTransfer.js+4−4
@@ -26,13 +26,13 @@ const labelForProgress = progress => {
2626 if (progress <= 0) {
2727 return 'Verify Passport';
2828 } else if (progress <= TRANSACTION_PROGRESS.GENERATING) {
29− return 'Generating Transactions...';
29+ return 'Generating Ethereum Transactions...';
3030 } else if (progress <= TRANSACTION_PROGRESS.SIGNING) {
31− return 'Signing Transactions...';
31+ return 'Signing Ethereum Transactions...';
3232 } else if (progress <= TRANSACTION_PROGRESS.FUNDING) {
33− return 'Funding Transactions...';
33+ return 'Funding Ethereum Transactions...';
3434 } else if (progress <= TRANSACTION_PROGRESS.TRANSFERRING) {
35− return 'Transferring Point...';
35+ return 'Transferring ID...';
3636 } else if (progress <= TRANSACTION_PROGRESS.CLEANING) {
3737 return 'Cleaning Up...';
3838 } else if (progress <= TRANSACTION_PROGRESS.DONE) {
src/views/Admin/Reticket/ReticketExecute.js+4−4
@@ -26,13 +26,13 @@ const labelForProgress = progress => {
2626 if (progress <= 0) {
2727 return 'Starting...';
2828 } else if (progress <= TRANSACTION_PROGRESS.GENERATING) {
29− return 'Generating Transactions...';
29+ return 'Generating Ethereum Transactions...';
3030 } else if (progress <= TRANSACTION_PROGRESS.SIGNING) {
31− return 'Signing Transactions...';
31+ return 'Signing Ethereum Transactions...';
3232 } else if (progress <= TRANSACTION_PROGRESS.FUNDING) {
33− return 'Funding Transactions...';
33+ return 'Funding Ethereum Transactions...';
3434 } else if (progress <= TRANSACTION_PROGRESS.TRANSFERRING) {
35− return 'Transferring Point...';
35+ return 'Transferring ID...';
3636 } else if (progress <= TRANSACTION_PROGRESS.CLEANING) {
3737 return 'Cleaning Up...';
3838 } else if (progress <= TRANSACTION_PROGRESS.DONE) {
src/views/Point.js+3
@@ -11,6 +11,7 @@ import Greeting from 'components/Greeting';
1111import Passport from 'components/Passport';
1212import { ForwardButton, BootArvoButton } from 'components/Buttons';
1313import { matchBlinky } from 'components/Blinky';
14+import DownloadSigilButton from 'components/DownloadSigilButton';
1415
1516import * as need from 'lib/need';
1617import useInvites from 'lib/useInvites';
@@ -122,6 +123,8 @@ export default function Point() {
122123 )}
123124 <Grid.Item full as={BootArvoButton} />
124125 <Grid.Divider />
126+ <Grid.Item full as={DownloadSigilButton} point={point} />
127+ <Grid.Divider />
125128 </Grid>
126129 </View>
127130 );