Gospel page audio: choose-your-path narration (case, then Guilty or Not guilty tracks), branching player, three admin audio fields, generator --sample/--only; v2.41.0
Publish Container / build (push) Successful in 16m4s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-14 08:24:33 -04:00
1 parent ad1c3e35b1
commit ae0016cfee
9 files changed
+228 -55

No files matched your search

+12 -12
View File
@@ -7031,21 +7031,21 @@ const [dashboardNow, setDashboardNow] = useState(() => new Date())
</div>
<div className="admin-panel-subhead">
<h3>Audio narration</h3>
<p>An audio version of The Case, with a player at the top of the page. Leave this blank to hide the player.</p>
<p>A choose-your-path audio version. Listeners hear The Case, then choose Guilty or Not guilty and hear the matching track. Leave the first field blank to hide the player. If the two plea tracks are blank, the plea buttons just select the plea on the page.</p>
</div>
<div className="admin-field">
<label htmlFor="field-salvationAudioUrl">Audio file URL (MP3)</label>
<input id="field-salvationAudioUrl" type="text" placeholder="https://…/salvation-case.mp3" value={form.salvationAudioUrl ?? ''} onChange={e => handleChange('salvationAudioUrl', e.target.value)} />
</div>
{form.salvationAudioUrl?.trim() && (
<div className="admin-field">
<label>Preview</label>
<audio controls preload="none" src={form.salvationAudioUrl.trim()} style={{ width: '100%' }} />
{([
['salvationAudioUrl', '1. The Case (MP3)'],
['salvationAudioGuiltyUrl', '2. Guilty: next steps and prayer (MP3)'],
['salvationAudioNotGuiltyUrl', '3. Not guilty: what it means (MP3)'],
] as const).map(([key, label]) => (
<div className="admin-field" key={key}>
<label htmlFor={`field-${key}`}>{label}</label>
<input id={`field-${key}`} type="text" placeholder="https://…/salvation-case.mp3" value={form[key] ?? ''} onChange={e => handleChange(key, e.target.value)} />
{form[key]?.trim() && <audio controls preload="none" src={form[key].trim()} style={{ width: '100%', marginTop: 8 }} />}
</div>
)}
))}
<p className="admin-stats-note">
To make the file: put your ElevenLabs key and voice in your local <code>.env</code>, then run{' '}
<code>node --env-file=.env scripts/generate-salvation-audio.mjs</code>. Upload the MP3 in Asset Manager and paste its URL here, then Save and Publish.
To make the files: put your ElevenLabs key and voice in your local <code>.env</code>, try <code>node --env-file=.env scripts/generate-salvation-audio.mjs --sample</code> first, then run it without <code>--sample</code> to make all three. Upload the MP3s in Asset Manager and paste their URLs here, then Save and Publish.
</p>
</section>
)}