Valentin D. Pinkman
6 years ago
No known key found for this signature in database
GPG Key ID: E7D110669FFB8D3E
2 changed files with
4 additions and
3 deletions
-
src/commands/firmwareRepair.js
-
src/components/SettingsPage/RepairDeviceButton.js
|
|
@ -11,7 +11,7 @@ type Result = { progress: number } |
|
|
|
|
|
|
|
const cmd: Command<Input, Result> = createCommand( |
|
|
|
'firmwareRepair', |
|
|
|
({ version }) => repair(''), // devicePath='' HACK to not depend on a devicePath because it's dynamic
|
|
|
|
({ version }) => repair('', version), // devicePath='' HACK to not depend on a devicePath because it's dynamic
|
|
|
|
) |
|
|
|
|
|
|
|
export default cmd |
|
|
|
|
|
@ -61,6 +61,7 @@ class RepairDeviceButton extends PureComponent<Props, State> { |
|
|
|
} |
|
|
|
|
|
|
|
repairMcu = () => this.repair('0.8') |
|
|
|
repairGeneric = () => this.repair() |
|
|
|
|
|
|
|
render() { |
|
|
|
const { t } = this.props |
|
|
@ -78,8 +79,8 @@ class RepairDeviceButton extends PureComponent<Props, State> { |
|
|
|
isOpened={opened} |
|
|
|
onClose={this.close} |
|
|
|
onReject={this.close} |
|
|
|
onRepair={this.repair} |
|
|
|
onRepairMCU={this.repair} |
|
|
|
onRepair={this.repairGeneric} |
|
|
|
onRepairMCU={this.repairMcu} |
|
|
|
isLoading={isLoading} |
|
|
|
title={t('settings.repairDevice.title')} |
|
|
|
desc={t('settings.repairDevice.desc')} |
|
|
|