Admin: show and manage highlights archived on Finished Books (restore/remove); v2.9.7
Publish Container / build (push) Successful in 15m33s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-08 15:43:04 -04:00
1 parent 752611d121
commit 39691aedb3
2 files changed
+31 -1

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "siteforge",
"private": true,
"version": "2.9.6",
"version": "2.9.7",
"type": "module",
"scripts": {
"dev": "vite",
+30
View File
@@ -4702,6 +4702,36 @@ const [dashboardNow, setDashboardNow] = useState(() => new Date())
</select>
<p className="admin-field-help">Adds a &ldquo;Study This Book&rdquo; button to the playlist page and an audio-only link on the study hub.</p>
</div>
{(book.highlights ?? []).length > 0 && (
<div className="admin-field">
<label>Episode Highlights on this book&apos;s page ({(book.highlights ?? []).length})</label>
{(book.highlights ?? []).map(link => (
<div key={link.id} className="study-lesson-row">
<span className="study-lesson-ref" style={{ width: 70 }}>{link.episodeNumber ? `Ep. ${link.episodeNumber}` : '—'}</span>
<span className="study-lesson-title">{link.title || <em style={{ opacity: 0.5 }}>Untitled</em>}</span>
<div className="study-lesson-actions">
<button
type="button"
className="btn-admin-ghost"
title="Move back to the Episodes page as a General highlight so it can be edited"
onClick={() => setForm(f => ({
...f,
podcastFeaturedLinks: [...(f.podcastFeaturedLinks ?? []), { ...link, lane: 'general' as const }],
finishedBooks: (f.finishedBooks ?? []).map(b => b.id === book.id ? { ...b, highlights: (b.highlights ?? []).filter(h => h.id !== link.id) } : b),
}))}
>Restore</button>
<button
type="button"
className="btn-admin-remove"
style={{ fontSize: '0.8rem', padding: '0.2rem 0.5rem' }}
onClick={() => setForm(f => ({ ...f, finishedBooks: (f.finishedBooks ?? []).map(b => b.id === book.id ? { ...b, highlights: (b.highlights ?? []).filter(h => h.id !== link.id) } : b) }))}
>✕</button>
</div>
</div>
))}
<p className="admin-field-help">Highlights that moved here when this series ended. Restore puts one back on the Episodes page (as General) so you can edit it.</p>
</div>
)}
<div className="admin-field">
<label>Download URL <span style={{ fontWeight: 400, opacity: 0.7 }}>(ZIP — Google Drive, Dropbox, etc.)</span></label>
<input type="url" placeholder="https://drive.google.com/…" value={book.downloadUrl ?? ''} onChange={e => setForm(f => ({ ...f, finishedBooks: (f.finishedBooks ?? []).map(b => b.id === book.id ? { ...b, downloadUrl: e.target.value } : b) }))} />