Skip to content

Commit e8fa34a

Browse files
authored
Acknowledging alerts, etc. (#90)
* Added ability to acknowledge and hide weather alerts after they have been seen. * Filtered alerts are collapsed by default in the alerts display. * Fixed bug caused by selecting a previous location after deleting another previous location.
1 parent 08c1fc5 commit e8fa34a

23 files changed

Lines changed: 541 additions & 113 deletions

.idea/dictionaries/kshetline.xml

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 3.5.0
2+
3+
* Added ability to acknowledge and hide weather alerts after they have been seen.
4+
* Filtered alerts are collapsed by default in the alerts display.
5+
* Fixed bug caused by selecting a previous location after deleting another previous location.
6+
17
## 3.4.2
28

39
* That bug fix in 3.4.1? Turns out an alarm going off on the _same day_ clocks are changed could go off at the wrong time, not merely be displayed incorrectly. That's fixed now too.

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aw-clock",
3-
"version": "3.4.2",
3+
"version": "3.5.0",
44
"license": "MIT",
55
"author": "Kerry Shetline <kerry@shetline.com>",
66
"scripts": {
@@ -20,7 +20,7 @@
2020
"dependencies": {
2121
"@tubular/astronomy": "^3.5.0",
2222
"@tubular/math": "^3.3.1",
23-
"@tubular/time": "^3.8.8",
23+
"@tubular/time": "^3.8.9",
2424
"@tubular/util": "^4.13.1",
2525
"compare-versions": "^4.1.3",
2626
"jquery": "^3.6.0",

sass/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sass/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "aw-clock-sass",
3-
"version": "3.4.2",
3+
"version": "3.5.0",
44
"description": "SASS builder for aw-clock",
55
"keywords": [
66
"sass"
77
],
88
"author": "Kerry Shetline",
99
"license": "MIT",
1010
"devDependencies": {
11-
"sass": "^1.54.9"
11+
"sass": "^1.56.1"
1212
}
1313
}

server/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aw-clock-server",
3-
"version": "3.4.2",
3+
"version": "3.5.0",
44
"license": "MIT",
55
"author": "Kerry Shetline <kerry@shetline.com>",
66
"private": true,
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@tubular/math": "^3.3.1",
20-
"@tubular/time": "^3.8.8",
20+
"@tubular/time": "^3.8.9",
2121
"@tubular/util": "^4.13.1",
2222
"by-request": "^1.3.3",
2323
"compare-versions": "^4.1.3",

server/src/awcs-util.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,22 @@ export function alertCleanUp(alertText: string): string {
211211
return alert;
212212
}
213213

214+
export function checksum53(s: string, seed = 0): string {
215+
let h1 = 0xdeadbeef ^ seed;
216+
let h2 = 0x41c6ce57 ^ seed;
217+
218+
for (let i = 0, ch; i < s.length; ++i) {
219+
ch = s.charCodeAt(i);
220+
h1 = Math.imul(h1 ^ ch, 2654435761);
221+
h2 = Math.imul(h2 ^ ch, 1597334677);
222+
}
223+
224+
h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);
225+
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);
226+
227+
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(16).toUpperCase().padStart(14, '0');
228+
}
229+
214230
export function safeCompareVersions(firstVersion: string, secondVersion: string, defValue?: number): number;
215231
export function safeCompareVersions(firstVersion: string, secondVersion: string, operator?: CompareOperator, defValue?: boolean): boolean;
216232
export function safeCompareVersions(firstVersion: string, secondVersion: string,

0 commit comments

Comments
 (0)