update
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user