Skip to content

Commit

Permalink
Convert activity_desc to conditional clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
wapcaplet committed Feb 5, 2022
1 parent 18c3cfd commit 4b757c0
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions data/json/ui/activity.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,43 @@
"type": "widget",
"label": "Activity",
"style": "text",
"var": "activity_text",
"//": "Uses display::activity_text_color"
"clauses": [
{
"id": "none",
"text": "None",
"color": "light_gray",
"condition": { "compare_int": [ { "u_val": "activity_level" }, "==", { "const": 0 } ] }
},
{
"id": "light",
"text": "Light",
"color": "yellow",
"condition": { "compare_int": [ { "u_val": "activity_level" }, "==", { "const": 1 } ] }
},
{
"id": "moderate",
"text": "Moderate",
"color": "yellow",
"condition": { "compare_int": [ { "u_val": "activity_level" }, "==", { "const": 2 } ] }
},
{
"id": "brisk",
"text": "Brisk",
"color": "light_red",
"condition": { "compare_int": [ { "u_val": "activity_level" }, "==", { "const": 3 } ] }
},
{
"id": "active",
"text": "Active",
"color": "light_red",
"condition": { "compare_int": [ { "u_val": "activity_level" }, "==", { "const": 4 } ] }
},
{
"id": "extreme",
"text": "Extreme",
"color": "red",
"condition": { "compare_int": [ { "u_val": "activity_level" }, ">=", { "const": 5 } ] }
}
]
}
]

0 comments on commit 4b757c0

Please sign in to comment.