From c146d7ddb28eda883eb28da2e952179fb30af8fd Mon Sep 17 00:00:00 2001 From: Dotty Dotter Date: Fri, 24 Apr 2026 10:39:10 +0200 Subject: [PATCH] Fix: Podcast-Selector im Hauptbereich statt nur im Seitenpanel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Der Selector war vorher nur im 400px-Panel rechts sichtbar — auf Mobile oder bei schmalem Fenster quasi unsichtbar. Jetzt wird er zentriert im Mindmap-Bereich angezeigt, bis ein Podcast gewählt wird. Co-Authored-By: Claude Opus 4.6 (1M context) --- webapp/index.html | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/webapp/index.html b/webapp/index.html index 216b98d..58dd327 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -921,13 +921,19 @@ async function selectPodcast(podcastId) { const resp = await fetch(`${API_BASE}/api/podcasts/${podcastId}`); DATA = await resp.json(); CURRENT_PODCAST = podcastId; - // Clear existing graph + timeline if switching - document.getElementById('svg').innerHTML = ''; + // Reset mindmap area (might have been used for selector) + const mindmap = document.getElementById('mindmap'); + mindmap.style.display = ''; + mindmap.style.alignItems = ''; + mindmap.style.justifyContent = ''; + mindmap.style.flexDirection = ''; + mindmap.style.padding = ''; + mindmap.innerHTML = ''; + // Clear filters + timeline document.getElementById('staffel-filters').innerHTML = ''; const tl = document.getElementById('timeline-container'); if (tl) { tl.remove(); timelineBuilt = false; } // Reset to mindmap view - document.getElementById('mindmap').style.display = ''; document.querySelectorAll('.view-tab').forEach(t => t.classList.remove('active')); document.getElementById('tab-mindmap')?.classList.add('active'); TRANSCRIPTS = null; @@ -949,24 +955,35 @@ function showPodcastSelector(podcasts) { document.getElementById('cross-toggle').style.display = ''; } - let html = '

Podcast Mindmap

Wähle einen Podcast oder vergleiche zwei.

'; - html += '
'; + // Hide mindmap, show selector full-width in mindmap area + mindmap.innerHTML = ''; + mindmap.style.display = 'flex'; + mindmap.style.alignItems = 'center'; + mindmap.style.justifyContent = 'center'; + mindmap.style.flexDirection = 'column'; + mindmap.style.padding = '20px'; + + let selectorHtml = '

Podcast Mindmap

Wähle einen Podcast oder vergleiche zwei.

'; + selectorHtml += '
'; podcasts.forEach(p => { - html += `
`; - html += `

${escHtml(p.name)}

`; - html += `

${escHtml(p.description || '')}

`; - html += `
`; + selectorHtml += `
`; + selectorHtml += `

${escHtml(p.name)}

`; + selectorHtml += `

${escHtml(p.description || '')}

`; + selectorHtml += `
`; }); - html += '
'; + selectorHtml += '
'; if (podcasts.length > 1) { - html += '
'; - html += ''; - html += '
'; + selectorHtml += '
'; + selectorHtml += ''; + selectorHtml += '
'; } - html += '
'; - panel.innerHTML = html; + selectorHtml += '
'; + mindmap.innerHTML = selectorHtml; + + // Panel: minimal welcome + panel.innerHTML = '

Willkommen

Wähle links einen Podcast.

'; document.getElementById('app-title').textContent = 'Podcast'; document.title = 'Podcast Mindmap';