-
-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connect-popup): passphrase redesign [skip ci]
- Loading branch information
Showing
15 changed files
with
221 additions
and
149 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
File renamed without changes.
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 was deleted.
Oops, something went wrong.
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 from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import { variables, PassphraseTypeCard } from '@trezor/components'; | ||
|
||
import { View } from '../components/View'; | ||
|
||
const Wrapper = styled.div<{ authConfirmation?: boolean }>` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
@media screen and (max-width: ${variables.SCREEN_SIZE.MD}) { | ||
width: 100%; | ||
} | ||
`; | ||
|
||
const WalletsWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
`; | ||
|
||
const Divider = styled.div` | ||
margin: 16px 16px; | ||
height: 1px; | ||
background: ${props => props.theme.STROKE_GREY}; | ||
`; | ||
|
||
// todo: | ||
const Translation = (props: any) => <span>{props.id}</span>; | ||
|
||
// todo: | ||
export const Passphrase = (props: any) => { | ||
console.log('Passphrase.props', props); | ||
const { device, onPassphraseSubmit } = props; | ||
const { features } = device; | ||
|
||
const offerPassphraseOnDevice = | ||
features && | ||
features.capabilities && | ||
features.capabilities.includes('Capability_PassphraseEntry'); | ||
|
||
return ( | ||
<View title="Passphrase"> | ||
{/* todo: this part could be shared with suite? */} | ||
<Wrapper> | ||
<WalletsWrapper> | ||
<PassphraseTypeCard | ||
title={<Translation id="TR_NO_PASSPHRASE_WALLET" />} | ||
description={<Translation id="TR_STANDARD_WALLET_DESCRIPTION" />} | ||
submitLabel={<Translation id="TR_ACCESS_STANDARD_WALLET" />} | ||
type="standard" | ||
onSubmit={onPassphraseSubmit} | ||
/> | ||
<Divider /> | ||
<PassphraseTypeCard | ||
title={<Translation id="TR_WALLET_SELECTION_HIDDEN_WALLET" />} | ||
description={<Translation id="TR_HIDDEN_WALLET_DESCRIPTION" />} | ||
submitLabel={<Translation id="TR_WALLET_SELECTION_ACCESS_HIDDEN_WALLET" />} | ||
type="hidden" | ||
offerPassphraseOnDevice={offerPassphraseOnDevice} | ||
onSubmit={onPassphraseSubmit} | ||
/> | ||
</WalletsWrapper> | ||
</Wrapper> | ||
</View> | ||
); | ||
}; |
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,13 @@ | ||
import React from 'react'; | ||
|
||
// todo: maybe follow instructions on device would be enough? | ||
// todo: | ||
export const PassphraseOnDevice = (props: any) => { | ||
console.log('Passphrase.props', props); | ||
|
||
return ( | ||
<> | ||
<h3>Passphrase on device</h3> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.