Skip to content

Commit

Permalink
bugfix(Storage): Wrong message when LNX storage is full
Browse files Browse the repository at this point in the history
  • Loading branch information
mcayuelas-ledger committed Sep 20, 2022
1 parent badf7fb commit d3be887
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-snakes-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Wrong message when LNX storage is full
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@
},
"stepLanguage": {
"title": "Select your language",
"cta": "Continue",
"cta": "Continue",
"changeDeviceLanguage": "{{language}} is also available for your {{deviceName}}",
"changeDeviceLanguageDescription": "Would you like to change its language to {{language}}?",
"warning": {
Expand Down Expand Up @@ -3352,6 +3352,7 @@
"appsInstalled": "<0>{{number}}</0> app",
"appsInstalled_plural": "<0>{{number}}</0> apps",
"storageAvailable": "available",
"noFreeSpace": "No storage left",
"appsToUpdate": "<0>{{number}}</0> update",
"appsToUpdate_plural": "<0>{{number}}</0> updates"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const DeviceAppStorage = ({
[apps, appsSpaceBytes],
);

const isDeviceFull = !freeSpaceBytes;

return (
/* Fixme: Storage info line might be too tight with some translation, consider putting it on multiple lines */
<Box mx={6}>
Expand Down Expand Up @@ -106,24 +108,35 @@ const DeviceAppStorage = ({
</Trans>
</Text>
</Flex>

<Flex flexDirection={"row"} alignItems={"center"}>
{shouldWarnMemory && (
<Box mr={2}>
<WarningMedium color={"palette.warning.c60"} size={14} />
</Box>
)}
<Text
variant={"small"}
fontWeight={"medium"}
color={"palette.neutral.c80"}
>
<ByteSize
value={freeSpaceBytes}
deviceModel={deviceModel}
firmwareVersion={deviceInfo.version}
/>{" "}
<Trans i18nKey="manager.storage.storageAvailable" />
</Text>
{isDeviceFull ? (
<Text
variant={"small"}
fontWeight={"medium"}
color={"palette.warning.c60"}
>
<Trans i18nKey="manager.storage.noFreeSpace" />
</Text>
) : (
<Text
variant={"small"}
fontWeight={"medium"}
color={"palette.neutral.c80"}
>
<ByteSize
value={freeSpaceBytes}
deviceModel={deviceModel}
firmwareVersion={deviceInfo.version}
/>{" "}
<Trans i18nKey="manager.storage.storageAvailable" />
</Text>
)}
</Flex>
</Flex>
<StorageRepartition
Expand Down

0 comments on commit d3be887

Please sign in to comment.