Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fork
G
github
openandroidinstaller-dev
openandroidinstaller
Commits
62be5c35
Commit
62be5c35
authored
1 year ago
by
rudu
Browse files
Options
Download
Email Patches
Plain Diff
Added device specific notes
parent
f656346e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
README.md
README.md
+1
-0
openandroidinstaller/installer_config.py
openandroidinstaller/installer_config.py
+1
-0
openandroidinstaller/views/select_view.py
openandroidinstaller/views/select_view.py
+14
-0
No files found.
README.md
View file @
62be5c35
...
...
@@ -215,6 +215,7 @@ Every config file should have `metadata` with the following fields:
-
`device_code`
: str; The official device code.
-
`supported_device_codes`
: List[str]; A list of supported device codes for the config. The config will be loaded based on this field.
-
`twrp-link`
: [OPTIONAL] str; name of the corresponding twrp page.
-
`notes`
: [OPTIONAL] str; specific phone information, showed before choosing ROM / recovery
In addition to these metadata, every config can have optional
`requirements`
. If these are set, the user is asked to check if they are meet.
-
`android`
: [OPTIONAL] int|str; Android version to install prior to installing a custom ROM.
...
...
This diff is collapsed.
Click to expand it.
openandroidinstaller/installer_config.py
View file @
62be5c35
...
...
@@ -166,6 +166,7 @@ def validate_config(config: str) -> bool:
"device_code"
:
str
,
"supported_device_codes"
:
[
str
],
schema
.
Optional
(
"twrp-link"
):
str
,
schema
.
Optional
(
"notes"
):
str
,
},
schema
.
Optional
(
"requirements"
):
{
schema
.
Optional
(
"android"
):
schema
.
Or
(
str
,
int
),
...
...
This diff is collapsed.
Click to expand it.
openandroidinstaller/views/select_view.py
View file @
62be5c35
...
...
@@ -144,6 +144,20 @@ OpenAndroidInstaller works with the [TWRP recovery project](https://twrp.me/abou
# text row to show infos during the process
self
.
info_field
=
Row
()
# Device specific notes
if
"notes"
in
self
.
state
.
config
.
metadata
:
self
.
right_view
.
controls
.
extend
(
[
Text
(
"Important notes for your device"
,
style
=
"titleSmall"
,
color
=
colors
.
RED
,
weight
=
"bold"
,
),
Markdown
(
f
"""
{
self
.
state
.
config
.
metadata
[
'notes'
]
}
"""
),
]
)
# if there is an available download, show the button to the page
if
self
.
download_link
:
twrp_download_link
=
f
"https://dl.twrp.me/
{
self
.
state
.
config
.
twrp_link
if
self
.
state
.
config
.
twrp_link
else
self
.
state
.
config
.
device_code
}
"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment