8c6b2eeaa4
The versioning of analysis input and document files
(`analysis_input_v{N}.json`, `document_v{N}.md`) has been removed. All
analysis inputs will now use `analysis_input.json` and generated
documents will use `document.md`.
This simplifies file management, as there's no longer a need to track
and manage multiple versions of these files within a case directory. The
analysis worker will now overwrite the existing `document.md` if it
exists, ensuring that the latest analysis result is always present. The
`version` field has also been removed from `AnalyzeJob` and
`AnalysisInput`.
65 lines
2.4 KiB
HTML
65 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Doctate — Dokument</title>
|
|
<style>
|
|
body { font-family: sans-serif; max-width: 900px; margin: 2em auto; padding: 0 1em; }
|
|
header { display: flex; justify-content: space-between; align-items: center; }
|
|
header form { margin: 0; }
|
|
.back-button { display: inline-block; padding: 0.5em 1em; background: #4a90e2; color: white; text-decoration: none; border-radius: 4px; font-weight: bold; }
|
|
pre { white-space: pre-wrap; font-family: serif; font-size: 1.05em; line-height: 1.5; background: #f6f6f6; padding: 1em; border-radius: 4px; }
|
|
.meta { color: #666; font-family: monospace; font-size: 0.9em; margin-bottom: 1em; }
|
|
.copy-btn { padding: 0.5em 1em; font-size: 1em; border: 1px solid #4a90e2; background: white; color: #4a90e2; border-radius: 4px; cursor: pointer; font-weight: bold; }
|
|
.copy-btn:hover { background: #eaf3fc; }
|
|
.toolbar { display: flex; gap: 0.6em; margin: 1em 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div><a class="back-button" href="/web/cases">← Alle Fälle</a></div>
|
|
<form method="post" action="/web/logout"><button type="submit">Logout</button></form>
|
|
</header>
|
|
<h1>Dokument</h1>
|
|
<div class="meta">{{ case_id }}</div>
|
|
<div class="toolbar">
|
|
<button id="copy-btn" type="button" class="copy-btn" hidden>In Zwischenablage</button>
|
|
</div>
|
|
<pre id="doc-content">{{ content }}</pre>
|
|
<div class="toolbar">
|
|
<a class="back-button" href="/web/cases/{{ case_id }}">Aufnahmen</a>
|
|
</div>
|
|
<script>
|
|
(() => {
|
|
const btn = document.getElementById('copy-btn');
|
|
if (!btn) return;
|
|
btn.hidden = false;
|
|
const label = btn.textContent;
|
|
btn.addEventListener('click', async () => {
|
|
const text = document.getElementById('doc-content').innerText;
|
|
let ok = false;
|
|
try {
|
|
if (navigator.clipboard && window.isSecureContext) {
|
|
await navigator.clipboard.writeText(text);
|
|
ok = true;
|
|
}
|
|
} catch (_) { /* fall through */ }
|
|
if (!ok) {
|
|
const ta = document.createElement('textarea');
|
|
ta.value = text;
|
|
ta.setAttribute('readonly', '');
|
|
ta.style.position = 'fixed';
|
|
ta.style.top = '-1000px';
|
|
document.body.appendChild(ta);
|
|
ta.select();
|
|
try { ok = document.execCommand('copy'); } catch (_) {}
|
|
ta.remove();
|
|
}
|
|
btn.textContent = ok ? 'Kopiert ✓' : 'Fehlgeschlagen';
|
|
setTimeout(() => { btn.textContent = label; }, 1500);
|
|
});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|