Studio: more work on studio

This commit is contained in:
Pieter Vander Vennet 2023-10-07 03:07:32 +02:00
parent 81876fc5ed
commit 4e8dfc0026
20 changed files with 1842 additions and 94 deletions

View file

@ -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)
}