Improve readability of forecast
This commit is contained in:
parent
3a11465238
commit
6fc97ef3ff
@ -17,7 +17,7 @@ function loadWeather(reload) {
|
||||
}
|
||||
|
||||
if (userPosition.coords.accuracy > 99999) {
|
||||
app.dialog.alert("Couldn't find your location. Wait for a GPS signal and try again.", "Error");
|
||||
app.dialog.alert("Couldn't find your location. Wait a few seconds and press the reload button.", "Error");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -197,15 +197,16 @@ function loadWeather(reload) {
|
||||
var low = (getStorage("units") == "metric" ? Math.round(ftoc(resp.forecast[i].temp.min)) : Math.round(resp.forecast[i].temp.min));
|
||||
var high = (getStorage("units") == "metric" ? Math.round(ftoc(resp.forecast[i].temp.max)) + " °C" : Math.round(resp.forecast[i].temp.max) + " °F");
|
||||
var precipcolor = precipChanceToColor(resp.forecast[i].precipitation.chance);
|
||||
var uvcolor = uvIndexToColor(resp.forecast[i].uv_index);
|
||||
forecastItems.push({
|
||||
day: (i == 0 ? "Today" : formatTimestamp('l', resp.forecast[i].date)),
|
||||
temps: low + " to " + high,
|
||||
uv_index: resp.forecast[i].uv_index,
|
||||
uv_color: uvIndexToColor(resp.forecast[i].uv_index),
|
||||
uv_foreground: uvIndexToColor(resp.forecast[i].uv_index) == "yellow" ? "black" : "white",
|
||||
uv_color: uvcolor,
|
||||
uv_foreground: (uvcolor == "purple" ? "white" : "black"),
|
||||
precip_chance: Math.round(resp.forecast[i].precipitation.chance * 100),
|
||||
precip_color: precipcolor,
|
||||
precip_foreground: precipcolor == "lightblue" ? "black" : "white"
|
||||
precip_foreground: precipcolor == "blue" ? "white" : "black"
|
||||
});
|
||||
}
|
||||
|
||||
|
2
www/package-lock.json
generated
2
www/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "PackageHelper",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user