@@ -122,6 +122,10 @@ def init_visuals(
122122 # initialize and manage button state.
123123 self .confirm_button = confirm_button (self .on_confirm )
124124 self .confirm_button .disabled = True
125+ self .continue_eitherway_button = confirm_button (
126+ self .on_confirm , "Continue without additional images"
127+ )
128+ self .continue_eitherway_button .disabled = True
125129 self .pick_recovery_dialog .on_result = self .enable_button_if_ready
126130 self .pick_image_dialog .on_result = self .enable_button_if_ready
127131 self .pick_dtbo_dialog .on_result = self .enable_button_if_ready
@@ -288,7 +292,13 @@ def build(self):
288292 self .right_view .controls .extend (
289293 [
290294 self .info_field ,
291- Row ([self .back_button , self .confirm_button ]),
295+ Row (
296+ [
297+ self .back_button ,
298+ self .continue_eitherway_button ,
299+ self .confirm_button ,
300+ ]
301+ ),
292302 ]
293303 )
294304 return self .view
@@ -614,24 +624,26 @@ def enable_button_if_ready(self, e):
614624 )
615625 ]
616626 self .confirm_button .disabled = True
627+ self .continue_eitherway_button .disabled = True
617628 self .right_view .update ()
618629 return
619630
620- # check if the additional images work with the device
621- if any (
622- v == False
623- for v in [
631+ self .continue_eitherway_button .disabled = False
632+
633+ # check if the additional images are there
634+ if not all (
635+ [
624636 self .selected_dtbo .value ,
625637 self .selected_vbmeta .value ,
626638 self .selected_super_empty .value ,
627639 ]
628640 ):
629641 logger .error (
630- "Some additional images don't match. Please select different ones."
642+ "Some additional images don't match or are missing . Please select different ones."
631643 )
632644 self .info_field .controls = [
633645 Text (
634- "Some additional images don't match. Please select the right ones." ,
646+ "Some additional images don't match or are missing . Please select the right ones." ,
635647 color = colors .RED ,
636648 weight = "bold" ,
637649 )
@@ -663,12 +675,15 @@ def enable_button_if_ready(self, e):
663675 )
664676 ]
665677 self .confirm_button .disabled = True
678+ self .continue_eitherway_button .disabled = True
666679 self .right_view .update ()
667680 return
668681
669682 logger .info ("Image works with the device. You can continue." )
670683 self .info_field .controls = []
671684 self .confirm_button .disabled = False
685+ self .continue_eitherway_button .disabled = False
672686 self .right_view .update ()
673687 else :
674688 self .confirm_button .disabled = True
689+ self .continue_eitherway_button .disabled = True
0 commit comments