Customize home screen (#250)
* Customize home screen * remove logs * Lint fix * move func * Fix for checklist * Fix save state * open api * Fix spec * Changelog * Add TODO * Button size --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
e7324495fe
commit
fd7bdde733
21 files changed
+638
-16
No files matched your search
@@ -2,6 +2,13 @@ import "pkg:/source/utils/RegistryUtils.bs"
|
||||
import "pkg:/source/utils/Types.bs"
|
||||
|
||||
function Init()
|
||||
m.typeMapping = {
|
||||
"boolean": "boolean"
|
||||
"string": "string"
|
||||
"radio": "string"
|
||||
"array": "array"
|
||||
}
|
||||
|
||||
m.disableSavingToRegistry = false
|
||||
LoadPreferencesFile()
|
||||
AddNodeFields()
|
||||
@@ -25,14 +32,7 @@ end function
|
||||
|
||||
function AddNodeFieldsFromPreference(pref as object, fields as object)
|
||||
if pref.key <> invalid and pref.type <> invalid
|
||||
fieldType = ""
|
||||
if pref.type = "boolean"
|
||||
fieldType = "boolean"
|
||||
else if pref.type = "string"
|
||||
fieldType = "string"
|
||||
else if pref.type = "radio"
|
||||
fieldType = "string"
|
||||
end if
|
||||
fieldType = m.typeMapping[pref.type]
|
||||
m.top.addField(pref.key, fieldType, false)
|
||||
fields[pref.key] = true
|
||||
end if
|
||||
|
||||
Reference in new issue
Block a user