bootloaderInstructions: add recovery variant

For official firmware recovery, we have separate videos for non-USB
hubs.

Closes: https://github.com/pybricks/support/issues/728
This commit is contained in:
David Lechner
2022-12-09 15:02:15 -06:00
committed by David Lechner
parent 0f871c6b2c
commit 4fcb82e361
12 changed files with 113 additions and 37 deletions
@@ -11,11 +11,7 @@ import {
import classNames from 'classnames';
import React from 'react';
import { useDispatch } from 'react-redux';
import {
legoRegisteredTrademark,
pybricksBleFirmwareRestoreVideoUrl,
} from '../../app/constants';
import ExternalLinkIcon from '../../components/ExternalLinkIcon';
import { legoRegisteredTrademark } from '../../app/constants';
import { hubHasUSB } from '../../components/hubPicker';
import { HubPicker } from '../../components/hubPicker/HubPicker';
import { useHubPickerSelectedHub } from '../../components/hubPicker/hooks';
@@ -51,7 +47,7 @@ const RestoreFirmwarePanel: React.VoidFunctionComponent = () => {
return (
<div className={classNames(Classes.DIALOG_BODY, Classes.RUNNING_TEXT)}>
<BootloaderInstructions hubType={hubType} />
<BootloaderInstructions hubType={hubType} recovery />
{hubHasUSB(hubType) ? (
<>
<p>
@@ -73,25 +69,7 @@ const RestoreFirmwarePanel: React.VoidFunctionComponent = () => {
</Button>
</>
) : (
<p>
{i18n.translate('restoreFirmwarePanel.instruction2.ble.message', {
lego: legoRegisteredTrademark,
thisVideo: (
<>
<a
href={pybricksBleFirmwareRestoreVideoUrl}
target="_blank"
rel="noreferrer"
>
{i18n.translate(
'restoreFirmwarePanel.instruction2.ble.thisVideo',
)}
</a>
<ExternalLinkIcon />
</>
),
})}
</p>
<p>{i18n.translate('restoreFirmwarePanel.instruction2.ble.message')}</p>
)}
</div>
);
@@ -12,8 +12,7 @@
"title": "Restore firmware",
"instruction2": {
"ble": {
"message": "Then use the official {lego} app for this hub to connect to the hub and restore the firmware. Watch {thisVideo} to see how.",
"thisVideo": "this video"
"message": "When the progress bar is done, the hub will reboot and the app will connect. The official firmware has been restored."
},
"dfu": "Then click the {flashFirmware} button below to connect to the hub and flash the firmware. After flashing is complete, connect the hub to one of the official {lego} apps and use it to update to the latest official firmware."
},