-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Wipe wallet group #1331
Merged
Merged
feat: Wipe wallet group #1331
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
29d7498
init
BrodyHughes 8344578
init
BrodyHughes 7acae6c
Merge branch 'master' into brody/wallet-wipe-wallet-group
BrodyHughes 580dbdd
finish up
BrodyHughes 66b8d36
clean up
BrodyHughes ad6d0ab
Merge branch 'master' into brody/wallet-wipe-wallet-group
BrodyHughes 2540f7c
remove sessions
BrodyHughes bdf092a
Merge branch 'master' into brody/wallet-wipe-wallet-group
BrodyHughes ee96376
Merge branch 'master' into brody/wallet-wipe-wallet-group
DanielSinclair 8373574
Merge branch 'master' into brody/wallet-wipe-wallet-group
BrodyHughes 2c325f9
better handle hidden wallets
greg-schrammel dafa642
ops, lets unhide so if it's re-added later, it's not hidden
greg-schrammel b95ce8a
:)
greg-schrammel 5949eac
fix
greg-schrammel ae2b070
😆🔫
greg-schrammel d2e4fe9
ack pressing space
greg-schrammel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
160 changes: 160 additions & 0 deletions
160
src/entries/popup/components/WarningInfo/walletGroupWipeWarningInfo.tsx
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,160 @@ | ||
import React, { useState } from 'react'; | ||
|
||
import { i18n } from '~/core/languages'; | ||
import { | ||
Box, | ||
Button, | ||
Column, | ||
Columns, | ||
Inline, | ||
Row, | ||
Rows, | ||
Separator, | ||
Stack, | ||
Symbol, | ||
Text, | ||
} from '~/design-system'; | ||
import { Lens } from '~/design-system/components/Lens/Lens'; | ||
|
||
import { Checkbox } from '../Checkbox/Checkbox'; | ||
import { | ||
IconAndCopyItem, | ||
IconAndCopyList, | ||
} from '../IconAndCopyList.tsx/IconAndCopyList'; | ||
|
||
const t = (s: string) => | ||
i18n.t(s, { scope: 'settings.privacy_and_security.wallets_and_keys' }); | ||
|
||
interface WarningInfoProps { | ||
iconAndCopyList: IconAndCopyItem[]; | ||
onProceed: () => void; | ||
testId?: string; | ||
} | ||
|
||
export default function WarningInfo({ | ||
iconAndCopyList, | ||
onProceed, | ||
testId, | ||
BrodyHughes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}: WarningInfoProps) { | ||
const [acknowledgeCheck, setAcknowledgeCheck] = useState(false); | ||
|
||
const buttonEnabled = !!acknowledgeCheck; | ||
return ( | ||
<Box | ||
height="full" | ||
alignItems="center" | ||
paddingHorizontal="20px" | ||
style={{ height: 535 }} | ||
> | ||
<Rows alignVertical="justify"> | ||
<Row> | ||
<Box alignItems="center"> | ||
<Stack space="24px"> | ||
<Inline alignHorizontal="center"> | ||
<Box | ||
borderRadius="round" | ||
boxShadow="18px accent" | ||
style={{ | ||
height: 60, | ||
width: 60, | ||
overflow: 'hidden', | ||
}} | ||
> | ||
<Box | ||
display="flex" | ||
alignItems="center" | ||
justifyContent="center" | ||
height="full" | ||
top="0" | ||
left="0" | ||
right="0" | ||
bottom="0" | ||
position="relative" | ||
style={{ | ||
background: | ||
'radial-gradient(100% 144.46% at 0% 50%, #FF9233 0%, #FA423C 100%)', | ||
zIndex: 1, | ||
}} | ||
> | ||
<Symbol | ||
symbol="exclamationmark.triangle.fill" | ||
size={26} | ||
color="label" | ||
weight={'bold'} | ||
/> | ||
</Box> | ||
</Box> | ||
</Inline> | ||
|
||
<Text size="16pt" weight="bold" color="label" align="center"> | ||
{i18n.t('common_titles.before_you_proceed')} | ||
</Text> | ||
|
||
<Inline alignHorizontal="center"> | ||
<Box alignItems="center" style={{ width: '106px' }}> | ||
<Separator color="separatorTertiary" strokeWeight="1px" /> | ||
</Box> | ||
</Inline> | ||
|
||
<Box paddingHorizontal="12px"> | ||
<IconAndCopyList iconAndCopyList={iconAndCopyList} /> | ||
</Box> | ||
</Stack> | ||
</Box> | ||
</Row> | ||
<Row height="content"> | ||
<Columns alignVertical="center" alignHorizontal="center" space="7px"> | ||
<Column width="content"> | ||
<Checkbox | ||
width="16px" | ||
height="16px" | ||
borderRadius="6px" | ||
selected={acknowledgeCheck} | ||
backgroundSelected="blue" | ||
borderColorSelected="blue" | ||
borderColor="labelTertiary" | ||
onClick={() => setAcknowledgeCheck(!acknowledgeCheck)} | ||
/> | ||
</Column> | ||
<Column width="content"> | ||
<Lens | ||
testId="wallet-wipe-check" | ||
onClick={() => setAcknowledgeCheck(!acknowledgeCheck)} | ||
> | ||
<Text | ||
align="left" | ||
size="12pt" | ||
weight="bold" | ||
color="labelSecondary" | ||
> | ||
{t('wipe_wallet_group.acknowlegement')} | ||
</Text> | ||
</Lens> | ||
</Column> | ||
</Columns> | ||
</Row> | ||
|
||
<Row height="content"> | ||
<Box width="full" paddingVertical="20px"> | ||
<Button | ||
testId={testId} | ||
color={buttonEnabled ? 'red' : 'fill'} | ||
height="44px" | ||
variant="flat" | ||
width="full" | ||
symbol={buttonEnabled ? 'trash' : 'arrow.up.circle.fill'} | ||
blur="26px" | ||
onClick={onProceed} | ||
disabled={!buttonEnabled} | ||
tabIndex={0} | ||
> | ||
{buttonEnabled | ||
? t('wipe_wallet_group.delete') | ||
: t('wipe_wallet_group.button_complete')} | ||
</Button> | ||
</Box> | ||
</Row> | ||
</Rows> | ||
</Box> | ||
); | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this don't have to be a prop either, seems like a very specific component no need to abstract it, or change the name and abstract to use in the other similar screens?