Browse Source

Fix repair link and add one more case

gre-patch-1
Gaëtan Renaudeau 6 years ago
parent
commit
9c57fe32ac
No known key found for this signature in database GPG Key ID: 7B66B85F042E5451
  1. 6
      src/components/SettingsPage/RepairDeviceButton.js
  2. 23
      src/components/base/Modal/RepairModal.js
  3. 7
      static/i18n/en/app.json

6
src/components/SettingsPage/RepairDeviceButton.js

@ -60,9 +60,6 @@ class RepairDeviceButton extends PureComponent<Props, State> {
})
}
repairMcu = () => this.repair('0.8')
repairGeneric = () => this.repair()
render() {
const { t } = this.props
const { opened, isLoading, error, progress } = this.state
@ -79,8 +76,7 @@ class RepairDeviceButton extends PureComponent<Props, State> {
isOpened={opened}
onClose={this.close}
onReject={this.close}
onRepair={this.repairGeneric}
onRepairMCU={this.repairMcu}
repair={this.repair}
isLoading={isLoading}
title={t('settings.repairDevice.title')}
desc={t('settings.repairDevice.desc')}

23
src/components/base/Modal/RepairModal.js

@ -129,8 +129,7 @@ type Props = {
confirmText?: string,
cancelText?: string,
onReject: Function,
onRepair: Function,
onRepairMCU: Function,
repair: ?string=>*,
t: T,
isLoading?: boolean,
analyticsName: string,
@ -149,8 +148,7 @@ class RepairModal extends PureComponent<Props> {
confirmText,
isDanger,
onReject,
onRepair,
onRepairMCU,
repair,
isLoading,
renderIcon,
t,
@ -183,22 +181,31 @@ class RepairModal extends PureComponent<Props> {
{error ? null : (
<>
<Button
onClick={onRepair}
onClick={() => repair()}
primary={!isDanger}
danger={isDanger}
isLoading={isLoading}
disabled={isLoading}
>
{t('settings.repairDevice.repair')}
{t('settings.repairDevice.generic')}
</Button>
<Button
onClick={onRepair}
onClick={() => repair("0.8")}
primary={!isDanger}
danger={isDanger}
isLoading={isLoading}
disabled={isLoading}
>
{t('settings.repairDevice.mcu')}
{t('settings.repairDevice.0_8')}
</Button>
<Button
onClick={() => repair("0.9")}
primary={!isDanger}
danger={isDanger}
isLoading={isLoading}
disabled={isLoading}
>
{t('settings.repairDevice.0_9')}
</Button>
</>
)}

7
static/i18n/en/app.json

@ -453,8 +453,9 @@
"title": "Repair your Ledger device",
"desc": "If you encountered some issue while updating your Ledger Nano S and cannot resume the update process, you can try this option to repair your device.",
"button": "Repair",
"repair": "Stuck in 'Bootloader'",
"mcu": "Stuck in 'MCU not genuine'"
"generic": "'Bootloader'",
"0_8": "'MCU not genuine'",
"0_9": "'follow repair instruction'"
},
"exportLogs": {
"title": "Export logs",
@ -906,4 +907,4 @@
"title": "Couldn’t load fee rates, please set manual fees"
}
}
}
}

Loading…
Cancel
Save