'use client'; import type { ParsedJournal } from '@/lib/journal'; import type { AssetPickTarget } from './BlockFields'; import PasswordField from '../fields/PasswordField'; type Frontmatter = ParsedJournal['frontmatter']; interface StorySettingsModalProps { frontmatter: Frontmatter; onChange: (updates: Partial) => void; onPickAsset: (target: AssetPickTarget) => void; onClose: () => void; } /** The entry's metadata — subtitle, author, date, cover, password, draft (#555). */ export function StorySettingsModal({ frontmatter, onChange, onPickAsset, onClose, }: StorySettingsModalProps) { return (

Story Settings & Metadata

onChange({ subtitle: e.target.value })} />
onChange({ author: e.target.value })} />
onChange({ date: e.target.value })} />
{frontmatter.coverAssetId ? ( // eslint-disable-next-line @next/next/no-img-element Cover ) : ( None )}
{frontmatter.coverAssetId && ( )}
onChange({ password: password ?? '' })} label="Entry password" />
onChange({ draft: e.target.checked })} />
); }