refactor: Remove unnecessary step indicators and warnings from upload and chapter preparation templates

This commit is contained in:
JB
2025-10-11 14:35:20 -07:00
parent 93fe48f601
commit 7203037a42
4 changed files with 1 additions and 18 deletions
+1 -6
View File
@@ -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) => {
@@ -66,7 +66,6 @@
</span>
{% endif %}
</nav>
<p class="modal__eyebrow">Step 1 of {{ total_steps }}</p>
<h2 class="modal__title" id="upload-modal-title">Upload &amp; settings</h2>
<p class="hint">Choose your source file or paste text, then set the defaults used for chapter analysis and speaker casting.</p>
</div>
@@ -33,7 +33,6 @@
</a>
{% endif %}
</nav>
<p class="modal__eyebrow">Step 2 of {{ total_steps }}</p>
<h2 class="modal__title" id="prepare-chapters-title">Select chapters</h2>
<p class="hint">Choose which chapters to convert. We'll analyse entities automatically when you continue.</p>
</div>
@@ -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] %}
<article class="chapter-card"
data-role="chapter-row"
data-disabled="{{ 'false' if is_enabled else 'true' }}"
@@ -106,10 +103,6 @@
</header>
<div class="chapter-card__details"
data-role="chapter-details">
<p class="chapter-card__snippet"
data-role="chapter-snippet">
{{ excerpt }}{% if raw_excerpt|length > 240 %}…{% endif %}
</p>
<div class="chapter-card__field">
<label for="chapter-{{ loop.index0 }}-title">Title</label>
<input type="text" id="chapter-{{ loop.index0 }}-title" name="chapter-{{ loop.index0 }}-title" value="{{ chapter.title }}">
@@ -146,9 +139,6 @@
value="{{ chapter.voice_formula or '' }}"
{% if selected_option != 'formula' %}hidden aria-hidden="true"{% else %}aria-hidden="false"{% endif %}>
</div>
<p class="chapter-card__notice" data-role="chapter-warning" hidden>
If this chapter mentions newsletter sign-ups or marketing content, double-check any references so listeners aren't sent to an outdated link.
</p>
</div>
</article>
{% endfor %}
@@ -37,7 +37,6 @@
</a>
{% endif %}
</nav>
<p class="modal__eyebrow">Step 3 of {{ total_steps }}</p>
<h2 class="modal__title" id="prepare-entities-title">Review entities</h2>
<p class="hint">Assign voices, tune pronunciations, and curate manual overrides before queueing the conversion.</p>
</div>