Skip to content

Commit 58b093b

Browse files
committed
Add card control to requriements view
1 parent 9c09b5f commit 58b093b

1 file changed

Lines changed: 45 additions & 24 deletions

File tree

openandroidinstaller/views.py

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
alignment,
2525
Checkbox,
2626
Switch,
27+
Card,
2728
Column,
2829
Container,
2930
Divider,
@@ -135,19 +136,24 @@ def enable_continue_button(e):
135136
label="The required android version is installed. (Or I know the risk of continuing)",
136137
on_change=enable_continue_button,
137138
)
138-
android_version_check = Column(
139-
[
140-
Markdown(
141-
f"""
139+
android_version_check = Card(
140+
Container(
141+
content=Column(
142+
[
143+
Markdown(
144+
f"""
142145
#### Android Version {required_android_version}:
143146
Before following these instructions please ensure that the device is currently using Android {required_android_version} firmware.
144147
If the vendor provided multiple updates for that version, e.g. security updates, make sure you are on the latest!
145148
If your current installation is newer or older than Android {required_android_version}, please upgrade or downgrade to the required
146149
version before proceeding (guides can be found on the internet!).
147150
"""
151+
),
152+
android_checkbox,
153+
]
148154
),
149-
android_checkbox,
150-
]
155+
padding=10,
156+
)
151157
)
152158
self.checkboxes.append(android_checkbox)
153159
self.right_view.controls.append(android_version_check)
@@ -159,18 +165,23 @@ def enable_continue_button(e):
159165
label="The required firmware version is installed. (Or I know the risk of continuing)",
160166
on_change=enable_continue_button,
161167
)
162-
firmware_version_check = Column(
163-
[
164-
Markdown(
165-
f"""
168+
firmware_version_check = Card(
169+
Container(
170+
content=Column(
171+
[
172+
Markdown(
173+
f"""
166174
#### Firmware Version {required_firmware_version}:
167175
Before following these instructions please ensure that the device is on firmware version {required_firmware_version}.
168176
To discern this, you can run the command `adb shell getprop ro.build.display.id` on the stock ROM.
169177
If the device is not on the specified version, please follow the instructions below to install it.
170178
"""
179+
),
180+
firmware_checkbox,
181+
]
171182
),
172-
firmware_checkbox,
173-
]
183+
padding=10,
184+
)
174185
)
175186
self.checkboxes.append(firmware_checkbox)
176187
self.right_view.controls.append(firmware_version_check)
@@ -180,16 +191,21 @@ def enable_continue_button(e):
180191
label="The battery level is over 80%.",
181192
on_change=enable_continue_button,
182193
)
183-
battery_version_check = Column(
184-
[
185-
Markdown(
186-
f"""
194+
battery_version_check = Card(
195+
Container(
196+
content=Column(
197+
[
198+
Markdown(
199+
f"""
187200
#### Battery level over 80%
188201
Before continuing make sure your device battery level is above 80%.
189202
"""
203+
),
204+
battery_checkbox,
205+
]
190206
),
191-
battery_checkbox,
192-
]
207+
padding=10,
208+
),
193209
)
194210
self.checkboxes.append(battery_checkbox)
195211
self.right_view.controls.append(battery_version_check)
@@ -199,15 +215,20 @@ def enable_continue_button(e):
199215
label="No lock code or fingerprint lock enabled.",
200216
on_change=enable_continue_button,
201217
)
202-
lock_check = Column(
203-
[
204-
Markdown(
205-
f"""
218+
lock_check = Card(
219+
Container(
220+
content=Column(
221+
[
222+
Markdown(
223+
f"""
206224
#### Disable all device lock codes and fingerprint locks.
207225
"""
226+
),
227+
lock_checkbox,
228+
]
208229
),
209-
lock_checkbox,
210-
]
230+
padding=10,
231+
),
211232
)
212233
self.checkboxes.append(lock_checkbox)
213234
self.right_view.controls.append(lock_check)

0 commit comments

Comments
 (0)