Files
Kit Langton 64a340a8be feat: ship HEX v2 desktop app
Add the GPUI workspace, native Metal dictation HUD, explicit local meeting capture and detection, single-listener lifecycle, signed app packaging, and the supporting prototypes and documentation.
2026-07-15 13:11:19 -04:00

91 lines
3.5 KiB
HTML

<!doctype html>
<!-- PROTOTYPE: throw away after the Voice Control app-shell direction is chosen. -->
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="data:," />
<title>Voice Control App Shell Prototype</title>
<style>
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #0d0e10; }
iframe { width: 100%; height: 100%; border: 0; display: block; }
.switcher {
position: fixed;
z-index: 100;
left: 50%;
bottom: 18px;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 6px;
padding: 5px;
border: 1px solid #4a4d53;
border-radius: 9px;
background: #111317;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
color: #e8e9eb;
font: 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.switcher button {
width: 30px;
height: 28px;
padding: 0;
border: 0;
border-radius: 5px;
background: #25282d;
color: #e8e9eb;
font: inherit;
cursor: pointer;
}
.switcher button:hover { background: #34383f; }
.switcher output { min-width: 190px; padding: 0 10px; text-align: center; }
</style>
</head>
<body>
<iframe id="prototype" title="Voice Control prototype variant"></iframe>
<nav class="switcher" aria-label="Prototype variants">
<button id="previous" type="button" aria-label="Previous variant">←</button>
<output id="label"></output>
<button id="next" type="button" aria-label="Next variant">→</button>
</nav>
<script>
const variants = [
{ key: "A", name: "Calm workspace", file: "explorations/variant-a.html" },
{ key: "B", name: "Activity journal", file: "explorations/variant-b.html" },
{ key: "C", name: "Three-pane inspector", file: "explorations/variant-c.html" },
];
const frame = document.querySelector("#prototype");
const label = document.querySelector("#label");
function currentIndex() {
const key = new URL(location.href).searchParams.get("variant")?.toUpperCase() ?? "A";
const index = variants.findIndex((variant) => variant.key === key);
return index < 0 ? 0 : index;
}
function show(index) {
const variant = variants[(index + variants.length) % variants.length];
const url = new URL(location.href);
url.searchParams.set("variant", variant.key);
history.replaceState(null, "", url);
frame.src = variant.file;
label.value = `${variant.key} — ${variant.name}`;
}
document.querySelector("#previous").addEventListener("click", () => show(currentIndex() - 1));
document.querySelector("#next").addEventListener("click", () => show(currentIndex() + 1));
function handleArrowKey(event) {
const target = event.target;
if (target instanceof HTMLElement && (target.matches("input, textarea") || target.isContentEditable)) return;
if (event.key === "ArrowLeft") show(currentIndex() - 1);
if (event.key === "ArrowRight") show(currentIndex() + 1);
}
addEventListener("keydown", handleArrowKey);
frame.addEventListener("load", () => frame.contentWindow.addEventListener("keydown", handleArrowKey));
show(currentIndex());
</script>
</body>
</html>