Skip to content

Commit

Permalink
fix(llm): fix ui select device screen
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWerey committed Apr 15, 2024
1 parent 2bde0e8 commit dc3d932
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 79 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-trainers-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

fix ui reg caused by previous PR on selectDevice2 screen. The ui was correct with CC but wrong without
164 changes: 85 additions & 79 deletions apps/ledger-live-mobile/src/components/SelectDevice2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,90 +334,96 @@ export default function SelectDevice({
flexDirection: "column",
}}
>
{isPostOnboardingVisible && (
<Box mb={8}>
<PostOnboardingEntryPointCard />
</Box>
)}
<Flex
flexDirection="row"
justifyContent="space-between"
alignItems="center"
mb={1}
px={16}
>
<Text variant="h5" fontWeight="semiBold">
<Trans i18nKey="manager.selectDevice.title" />
</Text>
{deviceList.length > 0 && (
<Touchable
onPress={isChoiceDrawerDisplayedOnAddDevice ? onAddNewPress : openBlePairingFlow}
{...addNewButtonEventProps}
>
<Flex flexDirection="row" alignItems="center">
<Text color="primary.c90" mr={3} fontWeight="semiBold">
<Trans
i18nKey={`manager.selectDevice.${
Platform.OS === "android" ? "addWithBluetooth" : "addNewCTA"
}`}
/>
</Text>
<IconsLegacy.PlusMedium color="primary.c90" size={15} />
</Flex>
</Touchable>
)}
</Flex>

<Flex>
<Flex px={16}>
{deviceList.length > 0 ? (
<DeviceList deviceList={deviceList} handleOnSelect={handleOnSelect} />
) : (
<Touchable
touchableTestID="connect-with-bluetooth"
onPress={
isChoiceDrawerDisplayedOnAddDevice ? onAddNewPress : openBlePairingFlow
}
{...addNewButtonEventProps}
>
<Flex
p={5}
mb={4}
borderRadius={5}
flexDirection="row"
alignItems="center"
borderColor="neutral.c40"
borderStyle="dashed"
borderWidth="1px"
>
<IconsLegacy.PlusMedium color="neutral.c90" size={20} />
<Text variant="large" fontWeight="semiBold" ml={5}>
{t(
`manager.selectDevice.${
Platform.OS === "android" ? "addWithBluetooth" : "addALedger"
}`,
)}
</Text>
</Flex>
</Touchable>
<Flex>
{isPostOnboardingVisible && (
<Box mb={8}>
<PostOnboardingEntryPointCard />
</Box>
)}
{Platform.OS === "android" &&
USBDevice === undefined &&
ProxyDevice === undefined && (
<Text
color="neutral.c100"
variant="large"
fontWeight="semiBold"
fontSize={4}
lineHeight="21px"
mt={3}
mb={3}
<Flex
flexDirection="row"
justifyContent="space-between"
alignItems="center"
mb={1}
px={16}
>
<Text variant="h5" fontWeight="semiBold">
<Trans i18nKey="manager.selectDevice.title" />
</Text>
{deviceList.length > 0 && (
<Touchable
onPress={
isChoiceDrawerDisplayedOnAddDevice ? onAddNewPress : openBlePairingFlow
}
{...addNewButtonEventProps}
>
<Trans i18nKey="manager.selectDevice.otgBanner" />
</Text>
<Flex flexDirection="row" alignItems="center">
<Text color="primary.c90" mr={3} fontWeight="semiBold">
<Trans
i18nKey={`manager.selectDevice.${
Platform.OS === "android" ? "addWithBluetooth" : "addNewCTA"
}`}
/>
</Text>
<IconsLegacy.PlusMedium color="primary.c90" size={15} />
</Flex>
</Touchable>
)}
</Flex>
</Flex>

<Flex pt={16}>
<Flex px={16}>
{deviceList.length > 0 ? (
<DeviceList deviceList={deviceList} handleOnSelect={handleOnSelect} />
) : (
<Touchable
touchableTestID="connect-with-bluetooth"
onPress={
isChoiceDrawerDisplayedOnAddDevice ? onAddNewPress : openBlePairingFlow
}
{...addNewButtonEventProps}
>
<Flex
p={5}
mb={4}
borderRadius={5}
flexDirection="row"
alignItems="center"
borderColor="neutral.c40"
borderStyle="dashed"
borderWidth="1px"
>
<IconsLegacy.PlusMedium color="neutral.c90" size={20} />
<Text variant="large" fontWeight="semiBold" ml={5}>
{t(
`manager.selectDevice.${
Platform.OS === "android" ? "addWithBluetooth" : "addALedger"
}`,
)}
</Text>
</Flex>
</Touchable>
)}
{Platform.OS === "android" &&
USBDevice === undefined &&
ProxyDevice === undefined && (
<Text
color="neutral.c100"
variant="large"
fontWeight="semiBold"
fontSize={4}
lineHeight="21px"
mt={3}
mb={3}
>
<Trans i18nKey="manager.selectDevice.otgBanner" />
</Text>
)}
</Flex>
{children}
</Flex>
{children}
</Flex>
<Flex alignItems="center" mt={10} mb={8}>
<BuyDeviceCTA />
Expand Down

0 comments on commit dc3d932

Please sign in to comment.