theater-reader/public/add.html
agent f353c14619 Transcribe through OpenRouter when OPENROUTER_API_KEY is set
A Claude subscription can't be used by the app, so let it use any cheap
vision model on OpenRouter instead (default google/gemini-3.1-flash-lite,
OPENROUTER_MODEL to change). The Anthropic API stays available as the
second choice. Both providers share the prompt and live behind one
{ name, model, transcribe } interface in server/providers.mjs; OpenRouter
retries 408/429/5xx and network errors and turns 401/402/404 into
messages the editor can show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
2026-11-04 15:38:24 +00:00

43 lines
1.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="cs">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Přidat hru – Divadelní čtečka</title>
<link rel="stylesheet" href="app.css">
<script type="module" src="add.js"></script>
</head>
<body class="page-add">
<header class="topbar">
<nav class="crumbs"><a href="./">← Všechny hry</a></nav>
<h1>Přidat hru</h1>
</header>
<main class="wrap">
<p class="error" id="disabled" hidden></p>
<form id="form" class="stack">
<label class="field"><span>Název hry</span><input id="title" required maxlength="200" placeholder="např. Lucerna"></label>
<label class="field"><span>Poznámka <small class="muted">(nepovinné)</small></span><input id="note" maxlength="500" placeholder="autor, rok, co chybí…"></label>
<fieldset class="field">
<legend>Fotky stran</legend>
<p class="muted" id="ai-note">Každou stranu přečte umělá inteligence a přepíše ji do textu. Text pak zkontrolujete a opravíte v editoru, než hru zveřejníte.</p>
<label class="dropzone" id="drop">
<input type="file" id="files" accept="image/*" multiple>
<span><b>Vyberte fotky</b> nebo je sem přetáhněte. Jedna fotka = jedna strana.</span>
</label>
<p class="muted small">Strany se seřadí podle názvu souboru; pořadí můžete změnit šipkami. Fotky se před nahráním zmenší.</p>
<ol class="thumbs" id="thumbs"></ol>
</fieldset>
<div class="actions">
<button class="primary" id="go" type="submit">Nahrát a přepsat</button>
</div>
<div class="progress" id="progress" hidden>
<progress id="bar" max="1" value="0"></progress>
<p id="status"></p>
</div>
<p class="error" id="error" hidden></p>
</form>
</main>
</body>
</html>