-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from zkBob/staging
Version 1.2.0
- Loading branch information
Showing
32 changed files
with
512 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import LinkDefault from 'components/Link'; | ||
|
||
export default () => ( | ||
<DemoBanner> | ||
For secure deposits, withdrawals and full-featured privacy,{' '} | ||
create a <Link href="/" internal>zkBob account here</Link> | ||
</DemoBanner> | ||
); | ||
|
||
const DemoBanner = styled.div` | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding: 6px 22px; | ||
background: ${props => props.theme.color.purpleExtraLight}; | ||
color: ${props => props.theme.color.white}; | ||
font-size: 14px; | ||
line-height: 22px; | ||
font-weight: ${props => props.theme.text.weight.bold}; | ||
text-align: center; | ||
position: relative; | ||
`; | ||
|
||
const Link = styled(LinkDefault)` | ||
color: ${props => props.theme.color.white}; | ||
font-weight: ${props => props.theme.text.weight.bold}; | ||
text-decoration: underline; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import Card from 'components/Card'; | ||
import Link from 'components/Link'; | ||
|
||
export default () => { | ||
return ( | ||
<Card> | ||
<Container> | ||
<Title>Demo version</Title> | ||
<Description> | ||
<Text> | ||
This zkBob version is designed for private,{' '} | ||
small-value transfers only (not for deposits/withdrawals). | ||
</Text> | ||
</Description> | ||
<Description> | ||
<Text>For a full-featured version,</Text> | ||
<Link href="/" internal size={16}>create a free zkBob account here.</Link> | ||
</Description> | ||
</Container> | ||
</Card> | ||
); | ||
}; | ||
|
||
const Title = styled.span` | ||
font-size: 24px; | ||
color: ${props => props.theme.text.color.primary}; | ||
font-weight: ${props => props.theme.text.weight.bold}; | ||
text-align: center; | ||
margin-bottom: 16px; | ||
`; | ||
|
||
const Text = styled.span` | ||
font-size: 16px; | ||
line-height: 22px; | ||
color: ${props => props.theme.text.color.secondary}; | ||
font-weight: ${props => props.theme.text.weight.normal}; | ||
text-align: center; | ||
`; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 16px 24px 20px; | ||
@media only screen and (max-width: 500px) { | ||
padding: 0 6px 12px; | ||
} | ||
`; | ||
|
||
const Description = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: 24px; | ||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React, { useState } from 'react'; | ||
import styled from 'styled-components'; | ||
import QrReader from 'react-qr-scanner' | ||
|
||
import { ReactComponent as QrCodeIconDefault } from 'assets/qr-code.svg'; | ||
import { ReactComponent as CrossIconDefault } from 'assets/cross.svg'; | ||
|
||
export default ({ onResult }) => { | ||
const [showScanner, setShowScanner] = useState(false); | ||
|
||
const handleScan = data => { | ||
if (!data) return; | ||
onResult(data.text); | ||
setShowScanner(false); | ||
} | ||
|
||
return ( | ||
<> | ||
<QrCodeIcon onClick={e => { e.stopPropagation(); setShowScanner(true); }} /> | ||
{showScanner && ( | ||
<ScannerContainer onClick={e => e.stopPropagation()}> | ||
<CrossIcon onClick={() => setShowScanner(false)} /> | ||
<QrReader | ||
constraints={{ | ||
audio: false, | ||
video: { | ||
facingMode: 'environment', | ||
}, | ||
}} | ||
onScan={handleScan} | ||
onError={error => console.log(error)} | ||
style={{ width: 300 }} | ||
/> | ||
</ScannerContainer> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
const QrCodeIcon = styled(QrCodeIconDefault)` | ||
position: absolute; | ||
right: 22px; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
cursor: pointer; | ||
`; | ||
|
||
const CrossIcon = styled(CrossIconDefault)` | ||
position: absolute; | ||
top: 20px; | ||
right: 20px; | ||
padding: 10px; | ||
path { | ||
fill: #FFF; | ||
} | ||
`; | ||
|
||
const ScannerContainer = styled.div` | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background: rgba(0, 0, 0, 0.8); | ||
z-index: 9999; | ||
`; |
Oops, something went wrong.