Files
busbar-designer/static/holder.html
T
wenil af3ed092dc holder: explicit Render button + progress UI + longer render timeout
- Replace debounced auto-render-on-param-change with an explicit Render
  button. Param changes mark the button "dirty" (accent ring); user clicks
  Render to drive a render. A Cancel button (AbortController) appears
  while a render is in flight.
- Add indeterminate progress bar with elapsed-time counter in the status
  panel. Real OpenSCAD --progress streaming can come later.
- Bump OPENSCAD_TIMEOUT default 60s -> 300s and gunicorn --timeout
  120s -> 300s. The 60s cap was misclassified by the frontend as
  "OpenSCAD not installed" because the error string contained the word
  "openscad" -- which the JS matched too greedily.
- Frontend error classifier now distinguishes "binary not found",
  "timed out", and "geometry empty" cases and only shows the
  install-OpenSCAD hint for the real not-found case.
2026-05-25 11:22:04 +03:00

74 lines
2.4 KiB
HTML

<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Hex Holder Designer</title>
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="holder.css" />
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.165.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.165.0/examples/jsm/"
}
}
</script>
</head>
<body>
<header class="topbar">
<h1>Hex Holder Designer</h1>
<nav class="topbar-nav">
<a href="/holder" class="active">Holder</a>
<a href="/">Busbars</a>
</nav>
<span id="status" class="topbar-status">— cells</span>
<div class="actions">
<button id="btn-render" class="primary" title="Render STL with current parameters">Render</button>
<button id="btn-cancel" title="Cancel running render" hidden>Cancel</button>
<button id="btn-download-stl" title="Download STL of the current configuration">Download STL</button>
<button id="btn-download-scad" title="Download the OpenSCAD source with current parameters baked in">Download .scad</button>
<span class="sep"></span>
<button id="btn-to-busbar" class="primary" title="Open Busbar Designer with these cell coordinates pre-loaded">Design busbars →</button>
</div>
</header>
<main>
<aside class="left holder-left">
<section class="panel">
<h2>Parameters</h2>
<div id="param-form" class="param-form">
<div class="hint">Loading parameter schema…</div>
</div>
</section>
<section class="panel">
<h2>Status</h2>
<p class="hint" id="render-status">idle</p>
<div id="render-progress" class="render-progress" hidden>
<div class="render-progress-bar"><div class="render-progress-fill"></div></div>
<span id="render-elapsed" class="render-elapsed">0.0s</span>
</div>
<p class="hint" id="render-time"></p>
<p class="hint" id="warning"></p>
</section>
</aside>
<section class="right">
<div id="viewer3d" class="viewer3d"></div>
<div class="viewport-overlay">
<div id="hint-controls">left-drag: rotate · right-drag: pan · wheel: zoom</div>
</div>
</section>
</main>
<script src="js/api.js"></script>
<script type="module" src="js/holder-viewer.js"></script>
<script type="module" src="js/holder-app.js"></script>
</body>
</html>