This commit is contained in:
team3
2026-06-24 07:52:05 +02:00
parent 12125d0f2d
commit 3b1e84e17d
13 changed files with 46 additions and 224 deletions

View File

@@ -16,7 +16,7 @@ const props = defineProps({
ansichtModus: { type: String, default: 'kompakt' }, // kompakt | erklärend
})
const emit = defineEmits(['progressChanged', 'setAnsicht'])
const emit = defineEmits(['progressChanged', 'setAnsicht', 'openSidebar', 'fokusActive'])
// Rotierende Kapitel-Akzentfarben (ohne Rot)
const CH_COLORS = ['#3b82f6', '#8b5cf6', '#14b8a6', '#f59e0b', '#22c55e', '#6366f1']
@@ -97,6 +97,10 @@ const bausteine = computed(() =>
)
const fokusBaustein = computed(() => (fokusIndex.value === null ? null : bausteine.value[fokusIndex.value]))
// Fokus-Zustand an App melden (für die Sidebar über dem Overlay); Themenwechsel schließt den Fokus.
watch(fokusIndex, (v) => emit('fokusActive', v !== null))
watch(() => props.previewGuide?.id, () => { fokusIndex.value = null })
function openFokus(baustein, tab) {
if (!istPruefbar(baustein)) return // reine Lese-Sections (Rest/Rand) öffnen keinen Prüfungs-Fokus
const i = bausteine.value.findIndex((s) => s.title === baustein.title)
@@ -286,6 +290,7 @@ function extractContext() {
@close="fokusIndex = null"
@set-ansicht="$emit('setAnsicht', $event)"
@status-changed="(st) => onBausteinStatus(st.baustein, st)"
@open-sidebar="$emit('openSidebar')"
/>
<button v-if="previewGuide && !chatOpen && fokusIndex === null" class="chat-fab" :class="{ shifted: elementsOpen }" title="Fragen zum Guide" @click="openChat">💬</button>