-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecoder.html
More file actions
70 lines (64 loc) · 1.87 KB
/
Copy pathdecoder.html
File metadata and controls
70 lines (64 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Taler Optical Link — Decoder</title>
<style>
body {
font-family: system-ui, sans-serif;
max-width: 480px;
margin: 2rem auto;
padding: 0 1rem;
text-align: center;
}
#camera {
width: 100%;
max-width: 400px;
border: 1px solid #ccc;
background: #000;
}
.controls {
margin: 1rem 0;
display: flex;
gap: 0.5rem;
justify-content: center;
flex-wrap: wrap;
align-items: center;
}
#expected-hash {
font-family: ui-monospace, monospace;
width: 20rem;
max-width: 100%;
}
#status,
#metrics {
font-family: ui-monospace, monospace;
font-size: 0.9rem;
color: #333;
word-break: break-word;
}
</style>
</head>
<body>
<h1>Decoder</h1>
<p><a href="./index.html">← back</a></p>
<video id="camera" autoplay playsinline muted></video>
<canvas id="scan-canvas" style="display: none"></canvas>
<div class="controls">
<button id="start" type="button">Start</button>
<button id="stop" type="button" disabled>Stop</button>
</div>
<div class="controls">
<input id="expected-hash" type="text" placeholder="expected SHA-256 (optional)" />
<button id="load-expected" type="button">Load expected hash from sample</button>
</div>
<p id="status">Idle.</p>
<p id="metrics"></p>
<div class="controls">
<button id="export-json" type="button" disabled>Export JSON (last run)</button>
<button id="export-csv" type="button" disabled>Export CSV (all runs)</button>
</div>
<script type="module" src="/src/decoder.ts"></script>
</body>
</html>