From 7203037a4231a17b9207e21b538366f351a4012c Mon Sep 17 00:00:00 2001 From: JB Date: Sat, 11 Oct 2025 14:35:20 -0700 Subject: [PATCH] refactor: Remove unnecessary step indicators and warnings from upload and chapter preparation templates --- abogen/web/static/prepare.js | 7 +------ abogen/web/templates/partials/upload_modal.html | 1 - abogen/web/templates/prepare_chapters.html | 10 ---------- abogen/web/templates/prepare_entities.html | 1 - 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/abogen/web/static/prepare.js b/abogen/web/static/prepare.js index 1a44330..97742dc 100644 --- a/abogen/web/static/prepare.js +++ b/abogen/web/static/prepare.js @@ -263,8 +263,7 @@ document.addEventListener("DOMContentLoaded", () => { const updateRowState = (row) => { const enabled = row.querySelector('[data-role=chapter-enabled]'); - const inputs = Array.from(row.querySelectorAll("input[type=text], select, textarea")); - const warning = row.querySelector('[data-role=chapter-warning]'); + const inputs = Array.from(row.querySelectorAll("input[type=text], select, textarea")); const toggle = row.querySelector('[data-role="chapter-toggle"]'); const isChecked = enabled ? enabled.checked : true; row.dataset.disabled = isChecked ? "false" : "true"; @@ -299,10 +298,6 @@ document.addEventListener("DOMContentLoaded", () => { toggle.setAttribute("aria-disabled", isChecked ? "false" : "true"); } - if (warning) { - warning.hidden = isChecked; - warning.setAttribute("aria-hidden", isChecked ? "true" : "false"); - } }; const toggleFormula = (select) => { diff --git a/abogen/web/templates/partials/upload_modal.html b/abogen/web/templates/partials/upload_modal.html index fb3d150..3cb8e7a 100644 --- a/abogen/web/templates/partials/upload_modal.html +++ b/abogen/web/templates/partials/upload_modal.html @@ -66,7 +66,6 @@ {% endif %} -

Choose your source file or paste text, then set the defaults used for chapter analysis and speaker casting.

diff --git a/abogen/web/templates/prepare_chapters.html b/abogen/web/templates/prepare_chapters.html index fafffd2..b545dfa 100644 --- a/abogen/web/templates/prepare_chapters.html +++ b/abogen/web/templates/prepare_chapters.html @@ -33,7 +33,6 @@ {% endif %} -

Choose which chapters to convert. We'll analyse entities automatically when you continue.

@@ -82,8 +81,6 @@ {% elif chapter.voice_formula %} {% set selected_option = 'formula' %} {% endif %} - {% set raw_excerpt = (chapter.text or '') | replace('\r', ' ') | replace('\n', ' ') %} - {% set excerpt = raw_excerpt[:240] %}
-

- {{ excerpt }}{% if raw_excerpt|length > 240 %}…{% endif %} -

@@ -146,9 +139,6 @@ value="{{ chapter.voice_formula or '' }}" {% if selected_option != 'formula' %}hidden aria-hidden="true"{% else %}aria-hidden="false"{% endif %}>
-
{% endfor %} diff --git a/abogen/web/templates/prepare_entities.html b/abogen/web/templates/prepare_entities.html index 9fbfe6d..d810c5b 100644 --- a/abogen/web/templates/prepare_entities.html +++ b/abogen/web/templates/prepare_entities.html @@ -37,7 +37,6 @@ {% endif %} -

Assign voices, tune pronunciations, and curate manual overrides before queueing the conversion.