update
This commit is contained in:
@@ -93,17 +93,9 @@ function confirmResetBlocks() {
|
|||||||
armOrRun('blocks', () => emit('resetBausteine'))
|
armOrRun('blocks', () => emit('resetBausteine'))
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleBlocksPlay() {
|
// Name click = open the block overview (generate/resume/remove all live there now).
|
||||||
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.
|
|
||||||
function onBlocksName() {
|
function onBlocksName() {
|
||||||
if (props.blocks.ready && !props.blocks.generating) emit('openBausteineView')
|
emit('openBausteineView')
|
||||||
else togglePanel('blocks')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function guideStatus(format) {
|
function guideStatus(format) {
|
||||||
@@ -380,14 +372,13 @@ function saveSource() {
|
|||||||
title="Aborted — can be resumed"
|
title="Aborted — can be resumed"
|
||||||
>Paused</span>
|
>Paused</span>
|
||||||
</button>
|
</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>
|
||||||
<div v-if="isOpen('blocks')" class="action-panel">
|
<div v-if="isOpen('blocks')" class="action-panel">
|
||||||
<template v-if="blocksState === 'generating'">
|
<template v-if="blocksState === 'generating'">
|
||||||
<button class="panel-btn danger" :class="{ armed: pendingConfirm === 'blocks' }" @click="confirmCancelBlocks">{{ pendingConfirm === 'blocks' ? 'Sure?' : 'Cancel' }}</button>
|
<button class="panel-btn danger" :class="{ armed: pendingConfirm === 'blocks' }" @click="confirmCancelBlocks">{{ pendingConfirm === 'blocks' ? 'Sure?' : 'Cancel' }}</button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<button class="panel-btn play" @click="handleBlocksPlay">{{ blocks.partial ? 'Resume' : blocks.ready ? 'Regenerate' : 'Generate' }}</button>
|
|
||||||
<button
|
<button
|
||||||
v-if="blocks.ready || blocks.partial"
|
v-if="blocks.ready || blocks.partial"
|
||||||
class="panel-btn danger"
|
class="panel-btn danger"
|
||||||
|
|||||||
Reference in New Issue
Block a user