-
Notifications
You must be signed in to change notification settings - Fork 327
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 #6866 from LedgerHQ/feat/LIVE-12214
[LLD] - [LIVE-12214] - Add Wallet Sync Manage screen
- Loading branch information
Showing
12 changed files
with
138 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"ledger-live-desktop": patch | ||
--- | ||
|
||
Add Wallet Sync manage screen |
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.
46 changes: 46 additions & 0 deletions
46
apps/ledger-live-desktop/src/newArch/WalletSync/SideContent/Manage/Option.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,46 @@ | ||
import { Flex, Box, Icons, Text } from "@ledgerhq/react-ui"; | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
export type OptionProps = { | ||
label: string; | ||
description: string; | ||
}; | ||
|
||
export const OptionContainer = styled.div` | ||
&:hover { | ||
cursor: pointer; | ||
} | ||
`; | ||
|
||
export const Separator = styled.div` | ||
&::after { | ||
content: ""; | ||
font-size: 13px; | ||
color: ${p => p.theme.colors.palette.divider}; | ||
padding: 0 15px; | ||
} | ||
`; | ||
|
||
export const Option = ({ label, description }: OptionProps) => ( | ||
<OptionContainer> | ||
<Flex> | ||
<Box paddingY={24} width={304}> | ||
<Box> | ||
<Text fontSize={13.44} variant="body"> | ||
{label} | ||
</Text> | ||
</Box> | ||
<Text fontSize={13.44} variant="body" color="hsla(0, 0%, 58%, 1)"> | ||
{description} | ||
</Text> | ||
</Box> | ||
|
||
<Flex flexGrow={1} alignItems={"center"} justifyContent={"end"}> | ||
<Icons.ChevronRight size="S" /> | ||
</Flex> | ||
</Flex> | ||
|
||
<Separator /> | ||
</OptionContainer> | ||
); |
54 changes: 54 additions & 0 deletions
54
apps/ledger-live-desktop/src/newArch/WalletSync/SideContent/Manage/index.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,54 @@ | ||
import { Box, Flex, Text, Icons } from "@ledgerhq/react-ui"; | ||
import React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import useTheme from "~/renderer/hooks/useTheme"; | ||
import { Option, OptionContainer, OptionProps } from "./Option"; | ||
|
||
const Separator = () => { | ||
const { colors } = useTheme(); | ||
return <Box height="1px" width="100%" backgroundColor={colors.opacityDefault.c05} />; | ||
}; | ||
|
||
const WalletSyncManage = () => { | ||
const { t } = useTranslation(); | ||
|
||
const Options: OptionProps[] = [ | ||
{ | ||
label: t("walletSync.manage.synchronize.label"), | ||
description: t("walletSync.manage.synchronize.description"), | ||
}, | ||
{ | ||
label: t("walletSync.manage.backup.label"), | ||
description: t("walletSync.manage.backup.description"), | ||
}, | ||
]; | ||
|
||
return ( | ||
<Box height="100%" paddingX="40px"> | ||
<Box marginBottom={"24px"}> | ||
<Text fontSize={23} variant="large"> | ||
{t("walletSync.title")} | ||
</Text> | ||
</Box> | ||
|
||
<Separator /> | ||
|
||
{Options.map((props, index) => ( | ||
<Option {...props} key={index} /> | ||
))} | ||
|
||
<Flex paddingY={24} justifyContent="space-between"> | ||
<Text fontSize={13.44}>{t("walletSync.manage.instance.label", { nbInstances: 0 })}</Text> | ||
|
||
<OptionContainer> | ||
<Flex columnGap={"8px"} alignItems={"center"}> | ||
<Text fontSize={13.44}>{t("walletSync.manage.instance.cta")}</Text> | ||
<Icons.ChevronRight size="S" /> | ||
</Flex> | ||
</OptionContainer> | ||
</Flex> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default WalletSyncManage; |
16 changes: 11 additions & 5 deletions
16
.../WalletSync/__tests__/walletSync.test.tsx → .../WalletSync/__tests__/walletSync.test.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
Empty file.
Empty file.
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
7 changes: 0 additions & 7 deletions
7
...-desktop/src/renderer/screens/settings/sections/General/WalletSync/SideContent/Manage.tsx
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...e-desktop/src/renderer/screens/settings/sections/General/WalletSync/setupTests/shared.tsx
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