@@ -350,6 +350,20 @@ setup.initialize = function (callback) {
350
350
}
351
351
} ;
352
352
353
+ // Fills in the "Build type" part of the "Firmware info" box
354
+ const showBuildType = function ( ) {
355
+ build_type_e . html (
356
+ FC . CONFIG . buildKey . length === 32
357
+ ? i18n . getMessage ( "initialSetupInfoBuildCloud" )
358
+ : i18n . getMessage ( "initialSetupInfoBuildLocal" ) ,
359
+ ) ;
360
+ } ;
361
+
362
+ // Hides the "Build type" part of the "Firmware info" box
363
+ const hideBuildType = function ( ) {
364
+ build_type_e . parent ( ) . hide ( ) ;
365
+ } ;
366
+
353
367
function showDialogBuildInfo ( title , message ) {
354
368
const dialog = $ ( ".dialogBuildInfo" ) [ 0 ] ;
355
369
@@ -404,6 +418,11 @@ setup.initialize = function (callback) {
404
418
}
405
419
} ;
406
420
421
+ // Hides the "Build info" part of the "Firmware info" box
422
+ const hideBuildInfo = function ( ) {
423
+ build_info_e . parent ( ) . hide ( ) ;
424
+ } ;
425
+
407
426
// Fills in the "Firmware" part of the "Firmware info" box
408
427
const showBuildFirmware = function ( ) {
409
428
const isIspConnected = ispConnected ( ) ;
@@ -460,19 +479,24 @@ setup.initialize = function (callback) {
460
479
}
461
480
} ;
462
481
482
+ // Hides the "Firmware" part of the "Firmware info" box
483
+ const hideBuildFirmware = function ( ) {
484
+ build_firmware_e . parent ( ) . hide ( ) ;
485
+ } ;
486
+
463
487
// Fills in the "Firmware info" box
464
488
function showFirmwareInfo ( ) {
465
489
msp_api_e . text ( FC . CONFIG . apiVersion ) ;
466
490
build_date_e . text ( FC . CONFIG . buildInfo ) ;
467
491
468
492
if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_45 ) ) {
469
- build_type_e . html (
470
- FC . CONFIG . buildKey . length === 32
471
- ? i18n . getMessage ( "initialSetupInfoBuildCloud" )
472
- : i18n . getMessage ( "initialSetupInfoBuildLocal" ) ,
473
- ) ;
493
+ showBuildType ( ) ;
474
494
showBuildInfo ( ) ;
475
495
showBuildFirmware ( ) ;
496
+ } else {
497
+ hideBuildType ( ) ;
498
+ hideBuildInfo ( ) ;
499
+ hideBuildFirmware ( ) ;
476
500
}
477
501
}
478
502
0 commit comments