Make recording guidelines editable from admin panel; v2.0.18
Publish Container / docker (push) Successful in 14m23s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-09-09 08:38:02 -04:00
1 parent ef1d9fd8fc
commit 86de45dbc3
5 files changed
+157 -8

No files matched your search

+13 -6
View File
@@ -39,6 +39,13 @@ export function NuggetsHostPortal() {
const [seafileConfigured, setSeafileConfigured] = useState(true)
const [twoFaEnabled, setTwoFaEnabled] = useState(false)
const [announcement, setAnnouncement] = useState('')
const [guidelines, setGuidelines] = useState<string[]>([
'Export as MP3 or WAV at 44.1 kHz, 128 kbps minimum.',
'File name: YYYY-MM-DD-EpisodeName.mp3 (e.g. 2026-09-09-Romans-5.mp3).',
'Recommended length: 8–15 minutes. Keep a 0.5s lead-in and 1s fade-out.',
'Normalize to -1 dBFS before exporting.',
'Match the episode name here to the file name exactly so search stays clean.',
])
// Login state
const [email, setEmail] = useState('')
@@ -100,12 +107,16 @@ export function NuggetsHostPortal() {
.catch(() => setScreen('login'))
}, [])
// Load announcement
// Load announcement and guidelines
useEffect(() => {
fetch('/api/nuggets-upload/announcement')
.then(r => r.json())
.then(d => { if (d.text) setAnnouncement(d.text) })
.catch(() => {})
fetch('/api/nuggets-upload/guidelines')
.then(r => r.json())
.then(d => { if (Array.isArray(d.lines) && d.lines.length) setGuidelines(d.lines) })
.catch(() => {})
}, [])
// Load history when history panel is opened
@@ -516,11 +527,7 @@ export function NuggetsHostPortal() {
{guidelinesOpen && (
<div style={s.collapsibleBody}>
<ul style={{ margin: 0, paddingLeft: '1.2rem', lineHeight: 1.6 }}>
<li>Export as <strong>MP3</strong> or <strong>WAV</strong> at 44.1 kHz, 128 kbps minimum.</li>
<li>File name: <code style={s.code}>YYYY-MM-DD-EpisodeName.mp3</code> (e.g. <code style={s.code}>2026-09-09-Romans-5.mp3</code>).</li>
<li>Recommended length: 8–15 minutes. Keep a 0.5s lead-in and 1s fade-out.</li>
<li>Normalize to <strong>-1 dBFS</strong> before exporting.</li>
<li>Match episode name here to the file name exactly so search stays clean.</li>
{guidelines.map((line, i) => <li key={i}>{line}</li>)}
</ul>
</div>
)}