File tree Expand file tree Collapse file tree 5 files changed +3
-23
lines changed Expand file tree Collapse file tree 5 files changed +3
-23
lines changed Original file line number Diff line number Diff line change 703703 "defaultMessage" : " Firmware update required" ,
704704 "description" : " Connection error dialog"
705705 },
706- "firmware-outdated-skip" : {
707- "defaultMessage" : " Skip and transfer manually" ,
708- "description" : " Connection error dialog content - firmware"
709- },
710706 "get-started-action" : {
711707 "defaultMessage" : " Get started" ,
712708 "description" : " Get started action"
Original file line number Diff line number Diff line change @@ -26,13 +26,11 @@ interface BrokenFirmwareDialogProps {
2626 isOpen : boolean ;
2727 onClose : ( ) => void ;
2828 onTryAgain : ( ) => void ;
29- onSkip : ( ) => void ;
3029}
3130
3231const BrokenFirmwareDialog = ( {
3332 isOpen,
3433 onClose,
35- onSkip,
3634 onTryAgain,
3735} : BrokenFirmwareDialogProps ) => {
3836 const { supportLinks } = useDeployment ( ) ;
@@ -100,9 +98,6 @@ const BrokenFirmwareDialog = ({
10098 < Button onClick = { onClose } variant = "secondary" size = "lg" >
10199 < FormattedMessage id = "cancel-action" />
102100 </ Button >
103- < Button onClick = { onSkip } variant = "secondary" size = "lg" >
104- < FormattedMessage id = "firmware-outdated-skip" />
105- </ Button >
106101 < Button onClick = { onTryAgain } variant = "primary" size = "lg" >
107102 < FormattedMessage id = "try-again-action" />
108103 </ Button >
Original file line number Diff line number Diff line change @@ -211,9 +211,6 @@ const ConnectionDialogs = () => {
211211 return (
212212 < BrokenFirmwareDialog
213213 { ...dialogCommonProps }
214- onSkip = { ( ) =>
215- actions . setFlowStep ( ConnectionFlowStep . ManualFlashingTutorial )
216- }
217214 onTryAgain = { actions . onTryAgain }
218215 />
219216 ) ;
Original file line number Diff line number Diff line change @@ -150,16 +150,14 @@ export class ConnectionStageActions {
150150 } ;
151151
152152 private handleConnectAndFlashFail = ( result : ConnectAndFlashFailResult ) => {
153+ if ( result === ConnectResult . ErrorBadFirmware ) {
154+ return this . setFlowStep ( ConnectionFlowStep . BadFirmware ) ;
155+ }
153156 if ( this . stage . flowType === ConnectionFlowType . ConnectBluetooth ) {
154157 downloadHex ( bluetoothUniversalHex ) ;
155158 return this . setFlowStep ( ConnectionFlowStep . ManualFlashingTutorial ) ;
156159 }
157-
158- // TODO: Not sure if this is a good way of error handling because it means
159- // there are 2 levels of switch statements to go through to provide UI
160160 switch ( result ) {
161- case ConnectResult . ErrorBadFirmware :
162- return this . setFlowStep ( ConnectionFlowStep . BadFirmware ) ;
163161 case ConnectResult . ErrorNoDeviceSelected :
164162 return this . setFlowStep (
165163 ConnectionFlowStep . TryAgainWebUsbSelectMicrobit
Original file line number Diff line number Diff line change 12071207 "value" : " Firmware update required"
12081208 }
12091209 ],
1210- "firmware-outdated-skip" : [
1211- {
1212- "type" : 0 ,
1213- "value" : " Skip and transfer manually"
1214- }
1215- ],
12161210 "get-started-action" : [
12171211 {
12181212 "type" : 0 ,
You can’t perform that action at this time.
0 commit comments