This commit is contained in:
Team3
2026-06-07 12:18:07 +02:00
parent b414d7f464
commit 1649a046d2
4 changed files with 59 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
<script setup>
import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
import { fetchGuides, fetchTopics, createTopic as apiCreateTopic, deleteTopic as apiDeleteTopic, createGuide as apiCreate, deleteGuide, cancelGuide as apiCancel, fetchBausteineStatus, fetchActiveBausteine, createBausteine as apiCreateBausteine, cancelBausteine as apiCancelBausteine, deleteBausteine as apiDeleteBausteine, fetchProjects, deleteProject as apiDeleteProject, fetchProviders, fetchStats } from './api.js'
import { fetchGuides, fetchTopics, createTopic as apiCreateTopic, deleteTopic as apiDeleteTopic, createGuide as apiCreate, deleteGuide, cancelGuide as apiCancel, fetchBausteineStatus, fetchActiveBausteine, createBausteine as apiCreateBausteine, cancelBausteine as apiCancelBausteine, deleteBausteine as apiDeleteBausteine, fetchProjects, deleteProject as apiDeleteProject, fetchProviders, fetchStats, fetchTopicFortschritt } from './api.js'
import TopicSidebar from './components/TopicSidebar.vue'
import TopicDetail from './components/TopicDetail.vue'
@@ -22,6 +22,7 @@ const activeBausteine = ref([])
const provider = ref(localStorage.getItem('provider') || 'claude')
const providers = ref([])
const stats = ref(null)
const fortschritt = ref({})
async function loadStats() {
try {
@@ -145,8 +146,10 @@ async function loadBausteine() {
activeBausteine.value = await fetchActiveBausteine()
if (selectedTopic.value) {
bausteine.value = await fetchBausteineStatus(selectedTopic.value)
fortschritt.value = await fetchTopicFortschritt(selectedTopic.value)
} else {
bausteine.value = { ...EMPTY_BAUSTEINE }
fortschritt.value = {}
}
if (activeBausteine.value.length && !pollTimer) startPolling()
} catch (e) {
@@ -325,6 +328,7 @@ onUnmounted(() => {
:projects="projectNames"
:selectedTopic="selectedTopic"
:stats="stats"
:fortschritt="fortschritt"
:doneByFormat="doneByFormat"
:latestByFormat="latestByFormat"
:allGuides="guides"
@@ -357,7 +361,7 @@ onUnmounted(() => {
:previewGuide="previewGuide"
:dark="darkMode"
:provider="provider"
@progressChanged="loadStats"
@progressChanged="loadStats(); loadBausteine()"
/>
<div v-else class="empty-main">
<p>Thema in der Sidebar anlegen oder auswählen.</p>