11eb645f3f
The distinction between `open/` and `done/` directories for cases has been removed. All cases for a user now reside directly under the user's directory (e.g., `<data_path>/<slug>/<case_id>/`). This simplifies path management and eliminates redundant directory traversals. Key changes include: - Removed `open/` and `done/` subdirectories in path resolution. - Introduced a `paths::case_dir` function as a single source of truth for case directory layout. - Updated various modules (`recovery`, `auth`, `routes`, `transcribe`, `tests`) to use the new path structure. - Adjusted templates to reflect the simplified case status representation.
62 lines
2.2 KiB
HTML
62 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Doctate — Cases</title>
|
|
<style>
|
|
body { font-family: sans-serif; max-width: 900px; margin: 2em auto; padding: 0 1em; }
|
|
.case { border: 1px solid #ccc; margin: 1em 0; padding: 1em; border-radius: 4px; }
|
|
.case h2 { margin: 0 0 0.3em 0; font-size: 1.1em; }
|
|
.case small { color: #666; font-family: monospace; }
|
|
.status-open { border-left: 4px solid #4a90e2; }
|
|
.status-done { border-left: 4px solid #7ed321; }
|
|
.recording { margin: 0.5em 0; }
|
|
.recording-head { display: flex; align-items: center; gap: 1em; }
|
|
.recording-head span { font-family: monospace; font-size: 0.9em; min-width: 20em; }
|
|
.transcript { margin: 0.5em 0 0 1em; padding: 0.5em; background: #f6f6f6; border-radius: 4px; white-space: pre-wrap; font-family: serif; }
|
|
.pending { margin: 0.5em 0 0 1em; color: #888; font-style: italic; }
|
|
.failed { margin: 0.5em 0 0 1em; color: #b00; font-weight: bold; }
|
|
.recording.failed-row { background: #fff7f7; border-left: 3px solid #e24a4a; padding-left: 0.5em; }
|
|
.oneliner { font-size: 1em; color: #333; margin: 0 0 0.3em 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Cases</h1>
|
|
{% if cases.is_empty() %}
|
|
<p>No cases found.</p>
|
|
{% else %}
|
|
{% for case in cases %}
|
|
<div class="case {% if case.has_document %}status-done{% else %}status-open{% endif %}">
|
|
<h2>{{ case.user_slug }} — {{ case.case_id_short }} ({% if case.has_document %}analyzed{% else %}in progress{% endif %})</h2>
|
|
{% match case.oneliner %}
|
|
{% when Some with (t) %}
|
|
<div class="oneliner">{{ t }}</div>
|
|
{% when None %}
|
|
{% endmatch %}
|
|
<small>{{ case.case_id }}</small>
|
|
{% for rec in case.recordings %}
|
|
<div class="recording{% if rec.failed %} failed-row{% endif %}">
|
|
<div class="recording-head">
|
|
<span>{{ rec.filename }}</span>
|
|
<audio controls preload="none">
|
|
<source src="/web/audio/{{ case.user_slug }}/{{ case.case_id }}/{{ rec.filename }}" type="audio/mp4">
|
|
</audio>
|
|
</div>
|
|
{% if rec.failed %}
|
|
<div class="failed">Transcription failed — rename away the .failed suffix to retry.</div>
|
|
{% else %}
|
|
{% match rec.transcript %}
|
|
{% when Some with (t) %}
|
|
<div class="transcript">{{ t }}</div>
|
|
{% when None %}
|
|
<div class="pending">Transcription pending…</div>
|
|
{% endmatch %}
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</body>
|
|
</html>
|