reworked the input type for more flexibility

This commit is contained in:
Matthias Puchstein
2025-07-06 17:19:36 +02:00
parent 84a72d5354
commit 62a2ff03dd
4 changed files with 131 additions and 92 deletions

View File

@@ -69,8 +69,19 @@ export default function DreamPage() {
<div className="flex items-center mb-4">
<span className="font-medium" style={{color: 'var(--accent)'}}>Traum-Beschreibung</span>
</div>
{(dream.input.inputType === 'image' || dream.input.inputType === 'audio') && (
<div className="flex justify-center mb-1">
{dream.input.inputType === 'audio' && (
<audio></audio>
)}
{dream.input.inputType === 'image' && (
<img alt={dream.input.imgAlt}></img>
)}
</div>)}
<p className="leading-relaxed text-lg">
{dream.input}
{(dream.input.inputType === 'text' && dream.input.input)
|| (dream.input.inputType === 'audio' && dream.input.transcript)
|| (dream.input.inputType === 'image' && dream.input.description)}
</p>
</div>
@@ -135,7 +146,7 @@ export default function DreamPage() {
<div className="space-y-2" style={{color: 'var(--text-muted)'}}>
<div className="flex justify-between">
<span>Eingabetyp</span>
<span className="capitalize">{dream.inputType}</span>
<span className="capitalize">{dream.input.inputType}</span>
</div>
<div className="flex justify-between">
<span>Datum</span>