Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4570cac5e5 | |||
| ae70f2022a | |||
| bf5c887c6c | |||
| eecc3c805f |
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd src-tauri && cargo clean
|
||||
cargo tauri build --target x86_64-pc-windows-gnu
|
||||
@@ -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);
|
||||
Generated
+1
-1
@@ -4,7 +4,7 @@ version = 4
|
||||
|
||||
[[package]]
|
||||
name = "WVUMedicine_HelpAlert_WebClient"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
||||
@@ -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,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
@@ -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);
|
||||
}
|
||||
})();;
|
||||
})();
|
||||
Reference in New Issue
Block a user