forked from MapComplete/MapComplete
Studio: more work on studio
This commit is contained in:
parent
81876fc5ed
commit
4e8dfc0026
20 changed files with 1842 additions and 94 deletions
|
@ -72,11 +72,11 @@
|
|||
configJson.mappings.push(
|
||||
{
|
||||
if: "value=true",
|
||||
then: "Yes "+(schema.hints?.iftrue??"")
|
||||
then: "Yes: "+(schema.hints?.iftrue??"")
|
||||
},
|
||||
{
|
||||
if: "value=false",
|
||||
then: "No "+(schema.hints?.iffalse??"")
|
||||
then: "No: "+(schema.hints?.iffalse??"")
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -106,6 +106,15 @@
|
|||
if (schema.type === "boolan") {
|
||||
return v === "true" || v === "yes" || v === "1"
|
||||
}
|
||||
if(mightBeBoolean(schema.type)){
|
||||
if(v === "true" || v === "yes" || v === "1"){
|
||||
return true
|
||||
}
|
||||
if(v === "false" || v === "no" || v === "0"){
|
||||
console.log("Setting false...")
|
||||
return false
|
||||
}
|
||||
}
|
||||
if (schema.type === "number") {
|
||||
return Number(v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue