-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: recovery dashboard widget (#2768)
* feat: recovery dashboard widget * fix: remove relaying widget * fix: `tx-builder.spec` test * fix: badge colour * fix: test
- Loading branch information
Showing
7 changed files
with
103 additions
and
119 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Box, Button, Card, Chip, Grid, Typography } from '@mui/material' | ||
import type { ReactElement } from 'react' | ||
|
||
import RecoveryLogo from '@/public/images/common/recovery.svg' | ||
import { WidgetBody, WidgetContainer } from '@/components/dashboard/styled' | ||
import { useDarkMode } from '@/hooks/useDarkMode' | ||
|
||
import css from './styles.module.css' | ||
|
||
export function Recovery(): ReactElement { | ||
const isDarkMode = useDarkMode() | ||
|
||
const onClick = () => { | ||
// TODO: Open enable recovery flow | ||
} | ||
|
||
return ( | ||
<WidgetContainer> | ||
<Typography component="h2" variant="subtitle1" className={css.label}> | ||
New in {'Safe{Wallet}'} | ||
</Typography> | ||
|
||
<WidgetBody> | ||
<Card className={css.card}> | ||
<Grid container className={css.grid}> | ||
<Grid item> | ||
<RecoveryLogo alt="Vault with a circular arrow around it" /> | ||
</Grid> | ||
<Grid item xs> | ||
<Box className={css.wrapper}> | ||
<Typography variant="h4" className={css.title}> | ||
Introducing account recovery{' '} | ||
</Typography> | ||
<Chip label="New" color={isDarkMode ? 'primary' : 'secondary'} size="small" className={css.chip} /> | ||
</Box> | ||
<Typography mt={1} mb={3}> | ||
Ensure that you never lose access to your funds by choosing a guardian to recover your account. | ||
</Typography> | ||
<Button variant="contained" onClick={onClick}> | ||
Set up recovery | ||
</Button> | ||
</Grid> | ||
</Grid> | ||
</Card> | ||
</WidgetBody> | ||
</WidgetContainer> | ||
) | ||
} |
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,32 @@ | ||
.label { | ||
font-weight: 700; | ||
margin-bottom: var(--space-2); | ||
} | ||
|
||
.card { | ||
padding: var(--space-4); | ||
height: inherit; | ||
} | ||
|
||
.grid { | ||
display: flex; | ||
align-items: center; | ||
height: inherit; | ||
gap: var(--space-3); | ||
} | ||
|
||
.wrapper { | ||
display: flex; | ||
align-items: center; | ||
gap: var(--space-1); | ||
} | ||
|
||
.title { | ||
font-weight: 700; | ||
display: inline; | ||
} | ||
|
||
.chip { | ||
border-radius: 4px; | ||
font-size: 12px; | ||
} |
This file was deleted.
Oops, something went wrong.
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