Files
DeepTutor/web/features/notes/components/NoteAudioOptions.tsx
Bingxi Zhao (Frank) 857a82e74a feat(notes): add block notebooks with inline reviews and linked favorites
Add rich text and learning blocks, media uploads, page trees, and revisioned notebook storage. Present AI suggestions at their target blocks with durable accept and dismiss actions.

Unify saved outputs as Favorites with typed expandable blocks, stable source links, atomic batch insertion, nesting, dragging, and undo/redo.

Validation: 99 frontend tests and 99 backend tests pass in an isolated snapshot, along with TypeScript, scoped ESLint, dependency architecture, and locale parity checks.
2026-10-17 23:15:23 +08:00

42 lines
1.1 KiB
TypeScript

'use client'
import { useTranslation } from 'react-i18next'
export default function NoteAudioOptions({
value,
disabled,
onChange,
}: {
value: Record<string, unknown>
disabled?: boolean
onChange: (value: Record<string, unknown>) => void
}) {
const { t } = useTranslation()
return (
<fieldset disabled={disabled} className="dt-note-audio-options">
{(['host_voice', 'expert_voice'] as const).map((key, i) => (
<label key={key}>
{t(i ? 'Expert voice' : 'Host voice')}
<input
value={String(value[key] || '')}
placeholder={t('Voice ID from your speech provider')}
onChange={e => onChange({ ...value, [key]: e.target.value })}
/>
</label>
))}
<label>
{t('Duration (minutes)')}
<select
value={Number(value.target_minutes) || 1}
onChange={e => onChange({ ...value, target_minutes: Number(e.target.value) })}
>
{[1, 3, 5, 10, 15].map(n => (
<option key={n} value={n}>
{n}
</option>
))}
</select>
</label>
</fieldset>
)
}