4 Commits

6 changed files with 20 additions and 6 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
cd src-tauri && cargo clean
cargo tauri build --target x86_64-pc-windows-gnu
+4
View File
@@ -0,0 +1,4 @@
var fake = document.createElement('div');
fake.id = 'fake-alert';
fake.innerHTML = 'FAKE TEST ALERT<br>Geo: Test<br>Elapsed Time: 0:00:01';
document.body.appendChild(fake);
+1 -1
View File
@@ -4,7 +4,7 @@ version = 4
[[package]]
name = "WVUMedicine_HelpAlert_WebClient"
version = "1.0.1"
version = "1.0.2"
dependencies = [
"serde",
"serde_json",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "WVUMedicine_HelpAlert_WebClient"
version = "1.0.1"
version = "1.0.2"
description = "Help Alert Web Client"
authors = ["James Brotosky <james.brotosky@wvumedicine.org"]
edition = "2021"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "WVUMedicine Help Alert Web Client",
"version": "1.0.1",
"version": "1.0.2",
"identifier": "org.wvumedicine.duress",
"build": {
"frontendDist": "../src"
+10 -3
View File
@@ -4,7 +4,7 @@
if (url) { window.location.href = url; return null; }
return originalOpen.apply(this, arguments);
};
if (window.location.href.includes('helpalert.html')) {
if (window.location.href.includes('/ha') || window.location.href.includes('helpalert.html')) {
if (Notification.permission === 'default') {
Notification.requestPermission();
}
@@ -28,7 +28,9 @@
if (!seenAlerts[key]) {
console.log('[DuressGuard] NEW ALERT:', key);
if (window.__TAURI_INTERNALS__) {
window.__TAURI_INTERNALS__.invoke('alert_detected', { name: key });
window.__TAURI_INTERNALS__.invoke('alert_detected', { name: key })
.then(function () { console.log('[DuressGuard] Invoke succeeded'); })
.catch(function (e) { console.log('[DuressGuard] Invoke failed:', e); });
}
try {
var ctx = new AudioContext();
@@ -45,5 +47,10 @@
}
seenAlerts = currentAlerts;
}, 2000);
setInterval(function () {
seenAlerts = {};
console.log('[DuressGuard] Cleared seen alerts - rechecking');
}, 120000);
}
})();;
})();