mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-23 03:59:30 -07:00
merge
This commit is contained in:
@@ -29,6 +29,9 @@ module.exports = {
|
|||||||
indent: [
|
indent: [
|
||||||
'error',
|
'error',
|
||||||
'tab',
|
'tab',
|
||||||
|
{
|
||||||
|
SwitchCase: 1
|
||||||
|
},
|
||||||
],
|
],
|
||||||
'no-tabs': 0,
|
'no-tabs': 0,
|
||||||
'no-console': 0,
|
'no-console': 0,
|
||||||
|
|||||||
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@@ -7,8 +7,6 @@
|
|||||||
"format": "compressed",
|
"format": "compressed",
|
||||||
"extensionName": ".css",
|
"extensionName": ".css",
|
||||||
"savePath": "/server/styles",
|
"savePath": "/server/styles",
|
||||||
"savePathSegmentKeys": null,
|
|
||||||
"savePathReplaceSegmentsWith": null
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"search.exclude": {
|
"search.exclude": {
|
||||||
@@ -21,5 +19,8 @@
|
|||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": "explicit"
|
"source.fixAll.eslint": "explicit"
|
||||||
}
|
},
|
||||||
|
"eslint.validate": [
|
||||||
|
"javascript"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
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.js
vendored
2
dist/resources/ws.min.js
vendored
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.13.0",
|
"version": "5.13.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.13.0",
|
"version": "5.13.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ejs": "^3.1.5",
|
"ejs": "^3.1.5",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ws4kp",
|
"name": "ws4kp",
|
||||||
"version": "5.13.0",
|
"version": "5.13.3",
|
||||||
"description": "Welcome to the WeatherStar 4000+ project page!",
|
"description": "Welcome to the WeatherStar 4000+ project page!",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class Almanac extends WeatherDisplay {
|
|||||||
if (iteration % 2 === 0) test = (lastPhase, testPhase) => lastPhase > threshold && testPhase <= threshold;
|
if (iteration % 2 === 0) test = (lastPhase, testPhase) => lastPhase > threshold && testPhase <= threshold;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// store last phase
|
// store last phase
|
||||||
const lastPhase = phase;
|
const lastPhase = phase;
|
||||||
// calculate new phase after step
|
// calculate new phase after step
|
||||||
moonDate = moonDate.plus(step);
|
moonDate = moonDate.plus(step);
|
||||||
@@ -103,7 +103,7 @@ class Almanac extends WeatherDisplay {
|
|||||||
if (phase > 0.9) phase -= 1.0;
|
if (phase > 0.9) phase -= 1.0;
|
||||||
// compare
|
// compare
|
||||||
if (test(lastPhase, phase)) {
|
if (test(lastPhase, phase)) {
|
||||||
// last iteration is three, return value
|
// last iteration is three, return value
|
||||||
if (iteration >= 3) break;
|
if (iteration >= 3) break;
|
||||||
// iterate recursively
|
// iterate recursively
|
||||||
return this.getMoonTransition(threshold, phaseName, moonDate, iteration + 1);
|
return this.getMoonTransition(threshold, phaseName, moonDate, iteration + 1);
|
||||||
@@ -160,15 +160,15 @@ class Almanac extends WeatherDisplay {
|
|||||||
|
|
||||||
const imageName = (type) => {
|
const imageName = (type) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'Full':
|
case 'Full':
|
||||||
return 'images/2/Full-Moon.gif';
|
return 'images/2/Full-Moon.gif';
|
||||||
case 'Last':
|
case 'Last':
|
||||||
return 'images/2/Last-Quarter.gif';
|
return 'images/2/Last-Quarter.gif';
|
||||||
case 'New':
|
case 'New':
|
||||||
return 'images/2/New-Moon.gif';
|
return 'images/2/New-Moon.gif';
|
||||||
case 'First':
|
case 'First':
|
||||||
default:
|
default:
|
||||||
return 'images/2/First-Quarter.gif';
|
return 'images/2/First-Quarter.gif';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ class CurrentWeather extends WeatherDisplay {
|
|||||||
|| observations.features[0].properties.windSpeed.value === null
|
|| observations.features[0].properties.windSpeed.value === null
|
||||||
|| observations.features[0].properties.textDescription === null
|
|| observations.features[0].properties.textDescription === null
|
||||||
|| observations.features[0].properties.textDescription === ''
|
|| observations.features[0].properties.textDescription === ''
|
||||||
|| observations.features[0].properties.icon === null) {
|
|| observations.features[0].properties.icon === null
|
||||||
|
|| observations.features[0].properties.dewpoint.value === null
|
||||||
|
|| observations.features[0].properties.barometricPressure.value === null) {
|
||||||
observations = undefined;
|
observations = undefined;
|
||||||
throw new Error(`Unable to get observations: ${station.properties.stationIdentifier}, trying next station`);
|
throw new Error(`Unable to get observations: ${station.properties.stationIdentifier}, trying next station`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,14 +72,14 @@ const getWeatherRegionalIconFromIconLink = (link, _isNightTime) => {
|
|||||||
case 'rain-n':
|
case 'rain-n':
|
||||||
return addPath('Rain-1992.gif');
|
return addPath('Rain-1992.gif');
|
||||||
|
|
||||||
// case 'snow':
|
// case 'snow':
|
||||||
// return addPath('Light-Snow.gif');
|
// return addPath('Light-Snow.gif');
|
||||||
// break;
|
// break;
|
||||||
|
|
||||||
// case 'cc_snowshowers.gif':
|
// case 'cc_snowshowers.gif':
|
||||||
// //case "heavy-snow.gif":
|
// //case "heavy-snow.gif":
|
||||||
// return addPath('AM-Snow-1994.gif');
|
// return addPath('AM-Snow-1994.gif');
|
||||||
// break;
|
// break;
|
||||||
|
|
||||||
case 'snow':
|
case 'snow':
|
||||||
case 'snow-n':
|
case 'snow-n':
|
||||||
@@ -120,6 +120,8 @@ const getWeatherRegionalIconFromIconLink = (link, _isNightTime) => {
|
|||||||
case 'tsra_hi-n':
|
case 'tsra_hi-n':
|
||||||
case 'hurricane':
|
case 'hurricane':
|
||||||
case 'tropical_storm':
|
case 'tropical_storm':
|
||||||
|
case 'hurricane-n':
|
||||||
|
case 'tropical_storm-n':
|
||||||
return addPath('Thunderstorm.gif');
|
return addPath('Thunderstorm.gif');
|
||||||
|
|
||||||
case 'wind':
|
case 'wind':
|
||||||
@@ -228,14 +230,14 @@ const getWeatherIconFromIconLink = (link, _isNightTime) => {
|
|||||||
case 'rain-n':
|
case 'rain-n':
|
||||||
return addPath('CC_Rain.gif');
|
return addPath('CC_Rain.gif');
|
||||||
|
|
||||||
// case 'snow':
|
// case 'snow':
|
||||||
// return addPath('Light-Snow.gif');
|
// return addPath('Light-Snow.gif');
|
||||||
// break;
|
// break;
|
||||||
|
|
||||||
// case 'cc_snowshowers.gif':
|
// case 'cc_snowshowers.gif':
|
||||||
// //case "heavy-snow.gif":
|
// //case "heavy-snow.gif":
|
||||||
// return addPath('AM-Snow-1994.gif');
|
// return addPath('AM-Snow-1994.gif');
|
||||||
// break;
|
// break;
|
||||||
|
|
||||||
case 'snow':
|
case 'snow':
|
||||||
case 'snow-n':
|
case 'snow-n':
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class Radar extends WeatherDisplay {
|
|||||||
minute,
|
minute,
|
||||||
}, {
|
}, {
|
||||||
zone: 'UTC',
|
zone: 'UTC',
|
||||||
}).setZone();
|
}).setZone(timeZone());
|
||||||
} else {
|
} else {
|
||||||
time = DateTime.fromHTTP(response.headers.get('last-modified')).setZone(timeZone());
|
time = DateTime.fromHTTP(response.headers.get('last-modified')).setZone(timeZone());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user