This commit is contained in:
team3
2026-06-30 00:40:10 +02:00
parent 3669fd8d0a
commit a2a5da25df

View File

@@ -93,17 +93,9 @@ function confirmResetBlocks() {
armOrRun('blocks', () => emit('resetBausteine'))
}
function handleBlocksPlay() {
if (blocksState.value === 'generating') return
// "Regenerate" (ready) = from start; first build/resume without deleting. Fine re-run via overview.
const abPhase = props.blocks.ready ? 1 : null
emit('bausteineClick', { instructions: '', abPhase })
}
// Name click = primary action: finished blocks → overview, otherwise toggle panel.
// Name click = open the block overview (generate/resume/remove all live there now).
function onBlocksName() {
if (props.blocks.ready && !props.blocks.generating) emit('openBausteineView')
else togglePanel('blocks')
emit('openBausteineView')
}
function guideStatus(format) {
@@ -380,14 +372,13 @@ function saveSource() {
title="Aborted — can be resumed"
>Paused</span>
</button>
<button class="panel-toggle" :class="{ open: isOpen('blocks') }" title="Actions" @click.stop="togglePanel('blocks')"></button>
<button v-if="blocksState === 'generating' || blocks.ready || blocks.partial" class="panel-toggle" :class="{ open: isOpen('blocks') }" title="Actions" @click.stop="togglePanel('blocks')"></button>
</div>
<div v-if="isOpen('blocks')" class="action-panel">
<template v-if="blocksState === 'generating'">
<button class="panel-btn danger" :class="{ armed: pendingConfirm === 'blocks' }" @click="confirmCancelBlocks">{{ pendingConfirm === 'blocks' ? 'Sure?' : 'Cancel' }}</button>
</template>
<template v-else>
<button class="panel-btn play" @click="handleBlocksPlay">{{ blocks.partial ? 'Resume' : blocks.ready ? 'Regenerate' : 'Generate' }}</button>
<button
v-if="blocks.ready || blocks.partial"
class="panel-btn danger"