77 Callout ,
88 Checkbox ,
99 Classes ,
10+ Code ,
1011 ControlGroup ,
1112 DialogStep ,
1213 FormGroup ,
@@ -17,6 +18,7 @@ import {
1718 MenuItem ,
1819 MultistepDialog ,
1920 NonIdealState ,
21+ Pre ,
2022 Spinner ,
2123 Switch ,
2224} from '@blueprintjs/core' ;
@@ -69,12 +71,12 @@ const SelectHubPanel: React.VoidFunctionComponent = () => {
6971 popoverClassName = { Classes2 . POPOVER2_CONTENT_SIZING }
7072 placement = "right-end"
7173 content = {
72- < div >
73- < h3 >
74+ < div className = { Classes . RUNNING_TEXT } >
75+ < h4 >
7476 { i18n . translate (
7577 'selectHubPanel.notOnListButton.info.mindstorms.title' ,
7678 ) }
77- </ h3 >
79+ </ h4 >
7880 < ul >
7981 < li >
8082 { i18n . translate (
@@ -92,11 +94,11 @@ const SelectHubPanel: React.VoidFunctionComponent = () => {
9294 ) }
9395 </ li >
9496 </ ul >
95- < h3 >
97+ < h4 >
9698 { i18n . translate (
9799 'selectHubPanel.notOnListButton.info.poweredUp.title' ,
98100 ) }
99- </ h3 >
101+ </ h4 >
100102 < ul >
101103 < li >
102104 { i18n . translate (
@@ -154,28 +156,27 @@ const AcceptLicensePanel: React.VoidFunctionComponent<AcceptLicensePanelProps> =
154156
155157 return (
156158 < div className = { dialogBody } >
157- < div className = "pb-firmware-installPybricksDialog-license" >
158- < div className = "pb-firmware-installPybricksDialog-license-text" >
159- { data ? (
160- < pre > { data . licenseText } </ pre >
161- ) : (
162- < NonIdealState
163- icon = { error ? 'error' : < Spinner /> }
164- description = {
165- error
166- ? i18n . translate ( 'licensePanel.licenseText.error' )
167- : undefined
168- }
169- />
170- ) }
171- </ div >
172- < Checkbox
173- label = { i18n . translate ( 'licensePanel.acceptCheckbox.label' ) }
174- checked = { licenseAccepted }
175- onChange = { ( e ) => onLicenseAcceptedChanged ( e . currentTarget . checked ) }
176- disabled = { ! data }
177- />
159+ < div className = "pb-firmware-installPybricksDialog-license-text" >
160+ { data ? (
161+ < Pre > { data . licenseText } </ Pre >
162+ ) : (
163+ < NonIdealState
164+ icon = { error ? 'error' : < Spinner /> }
165+ description = {
166+ error
167+ ? i18n . translate ( 'licensePanel.licenseText.error' )
168+ : undefined
169+ }
170+ />
171+ ) }
178172 </ div >
173+ < Checkbox
174+ className = "pb-firmware-installPybricksDialog-license-checkbox"
175+ label = { i18n . translate ( 'licensePanel.acceptCheckbox.label' ) }
176+ checked = { licenseAccepted }
177+ onChange = { ( e ) => onLicenseAcceptedChanged ( e . currentTarget . checked ) }
178+ disabled = { ! data }
179+ />
179180 </ div >
180181 ) ;
181182} ;
@@ -248,7 +249,7 @@ const ConfigureOptionsPanel: React.VoidFunctionComponent<SelectOptionsPanelProps
248249 < Switch
249250 labelElement = { i18n . translate (
250251 'optionsPanel.customMain.include.label' ,
251- { main : < code > main.py</ code > } ,
252+ { main : < Code > main.py</ Code > } ,
252253 ) }
253254 checked = { includeProgram }
254255 onChange = { ( e ) =>
@@ -349,82 +350,84 @@ const BootloaderModePanel: React.VoidFunctionComponent<BootloaderModePanelProps>
349350 return (
350351 < div className = { dialogBody } >
351352 { hubHasUSB ( hubType ) && isLinux ( ) && (
352- < p >
353- < Callout intent = { Intent . WARNING } icon = "warning-sign" >
354- { i18n . translate ( 'bootloaderPanel.warning.linux' ) } { ' ' }
355- < a
356- href = { pybricksUsbLinuxUdevRulesUrl }
357- target = "_blank"
358- rel = "noreferrer"
359- >
360- { i18n . translate ( 'bootloaderPanel.warning.learnMore' ) }
361- </ a >
362- < ExternalLinkIcon />
363- </ Callout >
364- </ p >
353+ < Callout intent = { Intent . WARNING } icon = "warning-sign" >
354+ { i18n . translate ( 'bootloaderPanel.warning.linux' ) } { ' ' }
355+ < a
356+ href = { pybricksUsbLinuxUdevRulesUrl }
357+ target = "_blank"
358+ rel = "noreferrer"
359+ >
360+ { i18n . translate ( 'bootloaderPanel.warning.learnMore' ) }
361+ </ a >
362+ < ExternalLinkIcon />
363+ </ Callout >
365364 ) }
366365 { hubHasUSB ( hubType ) && isWindows ( ) && (
367- < p >
368- < Callout intent = { Intent . WARNING } icon = "warning-sign" >
369- { i18n . translate ( 'bootloaderPanel.warning.windows' ) } { ' ' }
370- < a
371- href = { pybricksUsbDfuWindowsDriverInstallUrl }
372- target = "_blank"
373- rel = "noreferrer"
374- >
375- { i18n . translate ( 'bootloaderPanel.warning.learnMore' ) }
376- </ a >
377- < ExternalLinkIcon />
378- </ Callout >
379- </ p >
366+ < Callout intent = { Intent . WARNING } icon = "warning-sign" >
367+ { i18n . translate ( 'bootloaderPanel.warning.windows' ) } { ' ' }
368+ < a
369+ href = { pybricksUsbDfuWindowsDriverInstallUrl }
370+ target = "_blank"
371+ rel = "noreferrer"
372+ >
373+ { i18n . translate ( 'bootloaderPanel.warning.learnMore' ) }
374+ </ a >
375+ < ExternalLinkIcon />
376+ </ Callout >
380377 ) }
381378
382- < p > { i18n . translate ( 'bootloaderPanel.instruction1' ) } </ p >
383- < ol >
384- { hubHasUSB ( hubType ) && (
385- < li > { i18n . translate ( 'bootloaderPanel.step.disconnectUsb' ) } </ li >
386- ) }
387-
388- < li > { i18n . translate ( 'bootloaderPanel.step.powerOff' ) } </ li >
379+ < div className = { Classes . RUNNING_TEXT } >
380+ < p > { i18n . translate ( 'bootloaderPanel.instruction1' ) } </ p >
381+ < ol >
382+ { hubHasUSB ( hubType ) && (
383+ < li > { i18n . translate ( 'bootloaderPanel.step.disconnectUsb' ) } </ li >
384+ ) }
389385
390- { /* City hub has power issues and requires disconnecting motors/sensors */ }
391- { hubType === Hub . City && (
392- < li > { i18n . translate ( 'bootloaderPanel.step.disconnectIo' ) } </ li >
393- ) }
386+ < li > { i18n . translate ( 'bootloaderPanel.step.powerOff' ) } </ li >
394387
395- < li > { i18n . translate ( 'bootloaderPanel.step.holdButton' , { button } ) } </ li >
388+ { /* City hub has power issues and requires disconnecting motors/sensors */ }
389+ { hubType === Hub . City && (
390+ < li > { i18n . translate ( 'bootloaderPanel.step.disconnectIo' ) } </ li >
391+ ) }
396392
397- { hubHasUSB ( hubType ) && (
398- < li > { i18n . translate ( 'bootloaderPanel.step.connectUsb' ) } </ li >
399- ) }
393+ < li >
394+ { i18n . translate ( 'bootloaderPanel.step.holdButton' , { button } ) }
395+ </ li >
400396
401- < li >
402- { i18n . translate ( 'bootloaderPanel.step.waitForLight' , {
403- button,
404- light,
405- lightPattern,
406- } ) }
407- </ li >
397+ { hubHasUSB ( hubType ) && (
398+ < li > { i18n . translate ( 'bootloaderPanel.step.connectUsb' ) } </ li >
399+ ) }
408400
409- < li >
410- { i18n . translate (
411- /* hubs with USB will keep the power on, but other hubs won't */
412- hubHasUSB ( hubType )
413- ? 'bootloaderPanel.step.releaseButton'
414- : 'bootloaderPanel.step.keepHolding' ,
415- {
401+ < li >
402+ { i18n . translate ( 'bootloaderPanel.step.waitForLight' , {
416403 button,
417- } ,
418- ) }
419- </ li >
420- </ ol >
421- < p >
422- { i18n . translate ( 'bootloaderPanel.instruction2' , {
423- flashFirmware : (
424- < strong > { i18n . translate ( 'flashFirmwareButton.label' ) } </ strong >
425- ) ,
426- } ) }
427- </ p >
404+ light,
405+ lightPattern,
406+ } ) }
407+ </ li >
408+
409+ < li >
410+ { i18n . translate (
411+ /* hubs with USB will keep the power on, but other hubs won't */
412+ hubHasUSB ( hubType )
413+ ? 'bootloaderPanel.step.releaseButton'
414+ : 'bootloaderPanel.step.keepHolding' ,
415+ {
416+ button,
417+ } ,
418+ ) }
419+ </ li >
420+ </ ol >
421+ < p >
422+ { i18n . translate ( 'bootloaderPanel.instruction2' , {
423+ flashFirmware : (
424+ < strong >
425+ { i18n . translate ( 'flashFirmwareButton.label' ) }
426+ </ strong >
427+ ) ,
428+ } ) }
429+ </ p >
430+ </ div >
428431 </ div >
429432 ) ;
430433} ;
0 commit comments