- Extracted patient logic from `patient.html` to `js/patient.js` for better maintainability. - Optimized `js/bls.js` renderer to reduce garbage collection by reusing objects in the draw loop. - Decoupled state persistence from state updates. Added a `persist` flag to `setState` and `mergeState`. - Disabled state persistence in the Patient view and Admin preview to prevent excessive `localStorage` writes, significantly improving performance on low-end hardware. - Cleaned up `js/admin.js` to explicitly handle persistence only when necessary.
29 lines
1.1 KiB
HTML
29 lines
1.1 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>BLS Patient View</title>
|
|
<style>
|
|
html, body { height: 100%; margin: 0; }
|
|
:root { --bg:#000; }
|
|
.theme-dark { --bg:#000 }
|
|
body { background: var(--bg); display: flex; align-items: center; justify-content: center; }
|
|
#canvas { display: block; }
|
|
#overlay { position: fixed; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; color: #fff; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; opacity: 0.8; }
|
|
#overlay button { padding: 8px 10px; border: none; border-radius: 6px; background: #1f6feb; color: #fff; cursor: pointer; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas id="canvas"></canvas>
|
|
<div id="overlay" style="display:none">
|
|
<span>Click or tap to enable audio</span>
|
|
</div>
|
|
|
|
<script src="js/bls.js"></script>
|
|
<script src="js/audio.js"></script>
|
|
<script src="js/webrtc.js"></script>
|
|
<script src="js/patient.js"></script>
|
|
</body>
|
|
</html>
|