Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4570cac5e5 | |||
| ae70f2022a | |||
| bf5c887c6c | |||
| eecc3c805f | |||
| 967fb2cd6b | |||
| 6db8c864eb | |||
| 10eb6c6835 | |||
| 8364f6ec15 | |||
| 5357ee281f | |||
| d2f5a77107 |
@@ -22,3 +22,5 @@ dist-ssr
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
wry/
|
||||
|
||||
@@ -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.0"
|
||||
version = "1.0.2"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "WVUMedicine_HelpAlert_WebClient"
|
||||
version = "1.0.0"
|
||||
version = "1.0.2"
|
||||
description = "Help Alert Web Client"
|
||||
authors = ["James Brotosky <james.brotosky@wvumedicine.org"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn run() {
|
||||
let show = MenuItem::with_id(app, "show", "Open", true, None::<&str>)?;
|
||||
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
|
||||
let menu = Menu::with_items(app, &[&show, &quit])?;
|
||||
let url = WebviewUrl::External("https://helpalert.wvumedicine.org".parse().unwrap());
|
||||
let url = WebviewUrl::External("https://helpalert.wvumedicine.org/ha".parse().unwrap());
|
||||
let w_handle = app.handle().clone();
|
||||
WebviewWindowBuilder::new(app, "main", url)
|
||||
.title("WVU Medicine Help Alert")
|
||||
@@ -25,7 +25,7 @@ pub fn run() {
|
||||
let _ = w.eval(
|
||||
"document.documentElement.innerHTML = \
|
||||
'<head><style>*{margin:0;padding:0}html,body{height:100%;overflow:hidden}iframe{width:100%;height:100%;border:none}</style></head>' + \
|
||||
'<body><iframe src=\"https://helpalert.wvumedicine.org/PinPoint/helpalert.html\"></iframe></body>';"
|
||||
'<body><iframe src=\"https://helpalert.wvumedicine.org/ha\"></iframe></body>';"
|
||||
);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "WVUMedicine Help Alert Web Client",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"identifier": "org.wvumedicine.duress",
|
||||
"build": {
|
||||
"frontendDist": "../src"
|
||||
@@ -14,6 +14,10 @@
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"copyright": "© 2026 James Brotosky <james.brotosky@wvumedicine.org",
|
||||
"shortDescription": "HelpAlert Duress Alarm Web Client",
|
||||
"longDescription": "A lightweight desktop wrapper for the WVU Medicine PinPoint HelpAlert duress alarm system",
|
||||
"publisher": "James Brotosky",
|
||||
"active": true,
|
||||
"targets": [
|
||||
"nsis"
|
||||
|
||||
+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);
|
||||
}
|
||||
})();;
|
||||
})();
|
||||
-1
Submodule wry deleted from 6ef93b3e99
Reference in New Issue
Block a user