Merge branch 'main' of github.com:netbymatt/ws4kp
This commit is contained in:
commit
dfd9facc79
2
dist/index.html
vendored
2
dist/index.html
vendored
File diff suppressed because one or more lines are too long
2
dist/resources/ws.min.css
vendored
2
dist/resources/ws.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/resources/ws.min.js
vendored
2
dist/resources/ws.min.js
vendored
File diff suppressed because one or more lines are too long
498
package-lock.json
generated
498
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.9.0",
|
"version": "5.9.1",
|
||||||
"description": "Welcome to the WeatherStar 4000+ project page!",
|
"description": "Welcome to the WeatherStar 4000+ project page!",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -35,7 +35,8 @@ class Hazards extends WeatherDisplay {
|
||||||
const alerts = await json(url, { retryCount: 3, stillWaiting: () => this.stillWaiting() });
|
const alerts = await json(url, { retryCount: 3, stillWaiting: () => this.stillWaiting() });
|
||||||
const unsortedAlerts = alerts.features ?? [];
|
const unsortedAlerts = alerts.features ?? [];
|
||||||
const sortedAlerts = unsortedAlerts.sort((a, b) => (hazardLevels[b.properties.severity] ?? 0) - (hazardLevels[a.properties.severity] ?? 0));
|
const sortedAlerts = unsortedAlerts.sort((a, b) => (hazardLevels[b.properties.severity] ?? 0) - (hazardLevels[a.properties.severity] ?? 0));
|
||||||
this.data = sortedAlerts;
|
const filteredAlerts = sortedAlerts.filter((hazard) => hazard.properties.severity !== 'Unknown');
|
||||||
|
this.data = filteredAlerts;
|
||||||
|
|
||||||
// show alert indicator
|
// show alert indicator
|
||||||
if (this.data.length > 0) alert.classList.add('show');
|
if (this.data.length > 0) alert.classList.add('show');
|
||||||
|
@ -76,6 +77,7 @@ class Hazards extends WeatherDisplay {
|
||||||
if (lines.length === 0) {
|
if (lines.length === 0) {
|
||||||
this.setStatus(STATUS.loaded);
|
this.setStatus(STATUS.loaded);
|
||||||
this.timing.totalScreens = 0;
|
this.timing.totalScreens = 0;
|
||||||
|
this.setStatus(STATUS.loaded);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -318,8 +318,33 @@ button {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
@include u.status-colors();
|
@include u.status-colors();
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
|
||||||
|
.loading,
|
||||||
|
.retrying {
|
||||||
|
color: hsl(60, 100%, 30%);
|
||||||
|
}
|
||||||
|
|
||||||
.press-here {
|
.press-here {
|
||||||
color: white;
|
color: hsl(120, 100%, 30%);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.failed {
|
||||||
|
color: hsl(0, 100%, 30%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
color: hsl(0, 0%, 30%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled {
|
||||||
|
color: hsl(0, 0%, 30%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.press-here {
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
|
|
Loading…
Reference in a new issue