|
22 | 22 | from typing import Callable, Optional |
23 | 23 |
|
24 | 24 | import flet |
25 | | -from flet import (AlertDialog, AppBar, Banner, Checkbox, Column, Container, |
26 | | - Divider, ElevatedButton, FilePicker, FilePickerResultEvent, |
27 | | - FilledButton, Icon, Image, Page, ProgressBar, ProgressRing, |
28 | | - Row, Text, TextButton, TextField, UserControl, FloatingActionButton, |
29 | | - VerticalDivider, colors, icons) |
| 25 | +from flet import ( |
| 26 | + AlertDialog, |
| 27 | + AppBar, |
| 28 | + Banner, |
| 29 | + Checkbox, |
| 30 | + Column, |
| 31 | + Container, |
| 32 | + Divider, |
| 33 | + ElevatedButton, |
| 34 | + FilePicker, |
| 35 | + FilePickerResultEvent, |
| 36 | + FilledButton, |
| 37 | + Icon, |
| 38 | + Image, |
| 39 | + Page, |
| 40 | + ProgressBar, |
| 41 | + ProgressRing, |
| 42 | + Row, |
| 43 | + Text, |
| 44 | + TextButton, |
| 45 | + TextField, |
| 46 | + UserControl, |
| 47 | + FloatingActionButton, |
| 48 | + VerticalDivider, |
| 49 | + colors, |
| 50 | + icons, |
| 51 | +) |
30 | 52 | from installer_config import Step, _load_config |
31 | 53 | from loguru import logger |
32 | 54 | from tool_utils import call_tool_with_command, search_device |
33 | 55 | from utils import AppState, get_download_link, image_recovery_works_with_device |
34 | 56 | from widgets import call_button, confirm_button, get_title, link_button |
35 | 57 |
|
36 | 58 | # Toggle to True for development purposes |
37 | | -DEVELOPMENT = False |
| 59 | +DEVELOPMENT = False |
38 | 60 | DEVELOPMENT_CONFIG = "yuga" # "a3y17lte" # "sargo" |
39 | 61 |
|
40 | 62 |
|
@@ -339,7 +361,6 @@ def build(self): |
339 | 361 |
|
340 | 362 | def enable_button_if_ready(self, e): |
341 | 363 | """Enable the confirm button if both files have been selected.""" |
342 | | - |
343 | 364 | if (".zip" in self.selected_image.value) and ( |
344 | 365 | ".img" in self.selected_recovery.value |
345 | 366 | ): |
@@ -634,7 +655,9 @@ def main(page: Page): |
634 | 655 |
|
635 | 656 | # header |
636 | 657 | page.appbar = AppBar( |
637 | | - leading=Image(src=f"/assets/logo-192x192.png", height=40, width=40, border_radius=40), |
| 658 | + leading=Image( |
| 659 | + src=f"/assets/logo-192x192.png", height=40, width=40, border_radius=40 |
| 660 | + ), |
638 | 661 | leading_width=56, |
639 | 662 | toolbar_height=72, |
640 | 663 | elevation=0, |
|
0 commit comments