„incidence.js“ ändern

This commit is contained in:
Manuel Weiser 2020-10-27 18:21:03 +00:00
parent 53e648a5e1
commit 6ef05f9683

View File

@ -28,10 +28,10 @@ async function createWidget(items) {
label.textColor = data.incidence >= 50 ? Color.red() : data.incidence >= 35 ? Color.orange() : Color.green() label.textColor = data.incidence >= 50 ? Color.red() : data.incidence >= 35 ? Color.orange() : Color.green()
list.addText(data.areaName) list.addText(data.areaName)
const label2 = list.addText(data2.incidence+"") const label2 = list.addText(data.incidence2+"")
label2.font = Font.boldSystemFont(24) label2.font = Font.boldSystemFont(24)
label2.textColor = data2.incidence >= 50 ? Color.red() : data2.incidence >= 35 ? Color.orange() : Color.green() label2.textColor = data.incidence2 >= 50 ? Color.red() : data.incidence2 >= 35 ? Color.orange() : Color.green()
list.addText(data2.areaName) list.addText(data.areaName2)
if(data.shouldCache) { if(data.shouldCache) {
list.refreshAfterDate = new Date(Date.now() + 60*60*1000) list.refreshAfterDate = new Date(Date.now() + 60*60*1000)