11// SPDX-License-Identifier: MIT
2- // Copyright (c) 2022-2025 The Pybricks Authors
2+ // Copyright (c) 2022-2026 The Pybricks Authors
33
44import './bootloaderInstructions.scss' ;
55import { Callout , Intent } from '@blueprintjs/core' ;
@@ -19,6 +19,8 @@ import cityHubMp4 from './assets/bootloader-cityhub-540.mp4';
1919import cityHubVtt from './assets/bootloader-cityhub-metadata.vtt' ;
2020import essentialHubMp4 from './assets/bootloader-essentialhub-540.mp4' ;
2121import essentialHubVtt from './assets/bootloader-essentialhub-metadata.vtt' ;
22+ import ev3BrickMp4 from './assets/bootloader-ev3brick-540.mp4' ;
23+ import ev3BrickVtt from './assets/bootloader-ev3brick-metadata.vtt' ;
2224import inventorHubMp4 from './assets/bootloader-inventorhub-540.mp4' ;
2325import inventorHubVtt from './assets/bootloader-inventorhub-metadata.vtt' ;
2426import moveHubMp4 from './assets/bootloader-movehub-540.mp4' ;
@@ -54,6 +56,7 @@ type BootloaderInstructionsProps = {
5456const bootloaderDeviceNameMap : ReadonlyMap < Hub , string > = new Map ( [
5557 [ Hub . City , 'LEGO Bootloader' ] ,
5658 [ Hub . Essential , 'LEGO Technic Small Hub in DFU Mode' ] ,
59+ [ Hub . EV3 , 'LEGO EV3 Firmware Update' ] ,
5760 [ Hub . Inventor , 'LEGO Technic Large Hub in DFU Mode' ] ,
5861 [ Hub . Move , 'LEGO Bootloader' ] ,
5962 [ Hub . Prime , 'LEGO Technic Large Hub in DFU Mode' ] ,
@@ -63,6 +66,7 @@ const bootloaderDeviceNameMap: ReadonlyMap<Hub, string> = new Map([
6366const videoFileMap : ReadonlyMap < Hub , string > = new Map ( [
6467 [ Hub . City , cityHubMp4 ] ,
6568 [ Hub . Essential , essentialHubMp4 ] ,
69+ [ Hub . EV3 , ev3BrickMp4 ] ,
6670 [ Hub . Inventor , inventorHubMp4 ] ,
6771 [ Hub . Move , moveHubMp4 ] ,
6872 [ Hub . Prime , primeHubMp4 ] ,
@@ -72,6 +76,7 @@ const videoFileMap: ReadonlyMap<Hub, string> = new Map([
7276const metadataFileMap : ReadonlyMap < Hub , string > = new Map ( [
7377 [ Hub . City , cityHubVtt ] ,
7478 [ Hub . Essential , essentialHubVtt ] ,
79+ [ Hub . EV3 , ev3BrickVtt ] ,
7580 [ Hub . Inventor , inventorHubVtt ] ,
7681 [ Hub . Move , moveHubVtt ] ,
7782 [ Hub . Prime , primeHubVtt ] ,
@@ -81,6 +86,7 @@ const metadataFileMap: ReadonlyMap<Hub, string> = new Map([
8186const recoveryVideoFileMap : ReadonlyMap < Hub , string > = new Map ( [
8287 [ Hub . City , cityHubRecoveryMp4 ] ,
8388 [ Hub . Essential , essentialHubMp4 ] ,
89+ [ Hub . EV3 , ev3BrickMp4 ] ,
8490 [ Hub . Inventor , inventorHubMp4 ] ,
8591 [ Hub . Move , moveHubRecoveryMp4 ] ,
8692 [ Hub . Prime , primeHubMp4 ] ,
@@ -90,6 +96,7 @@ const recoveryVideoFileMap: ReadonlyMap<Hub, string> = new Map([
9096const recoveryMetadataFileMap : ReadonlyMap < Hub , string > = new Map ( [
9197 [ Hub . City , cityHubRecoveryVtt ] ,
9298 [ Hub . Essential , essentialHubVtt ] ,
99+ [ Hub . EV3 , ev3BrickVtt ] ,
93100 [ Hub . Inventor , inventorHubVtt ] ,
94101 [ Hub . Move , moveHubRecoveryVtt ] ,
95102 [ Hub . Prime , primeHubVtt ] ,
@@ -186,12 +193,6 @@ const BootloaderInstructions: React.FunctionComponent<BootloaderInstructionsProp
186193 } ) }
187194 </ li >
188195 ) }
189-
190- { hubType === Hub . EV3 && (
191- < li >
192- { i18n . translate ( 'instructionGroup.bootloaderMode.connectUsb' ) }
193- </ li >
194- ) }
195196 </ >
196197 ) ,
197198 [ i18n , recovery , hubType ] ,
@@ -314,6 +315,16 @@ const BootloaderInstructions: React.FunctionComponent<BootloaderInstructionsProp
314315 } ) }
315316 </ li >
316317 ) }
318+
319+ { hubType === Hub . EV3 && hubHasUSB ( hubType ) && (
320+ < li
321+ className = { classNames (
322+ activeStep === 'connect-usb' && 'pb-active-step' ,
323+ ) }
324+ >
325+ { i18n . translate ( 'instructionGroup.bootloaderMode.connectUsb' ) }
326+ </ li >
327+ ) }
317328 </ >
318329 ) ,
319330 [ recovery , activeStep , i18n , button , hubType , light , lightPattern ] ,
@@ -377,7 +388,7 @@ const BootloaderInstructions: React.FunctionComponent<BootloaderInstructionsProp
377388 1
378389 }
379390 >
380- { hubType === Hub . EV3 && (
391+ { hubType === Hub . EV3 && recovery && (
381392 < li >
382393 { i18n . translate (
383394 'instructionGroup.connect.selectEV3FirmwareType' ,
0 commit comments