phase 4
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, watch } from 'vue'
|
||||
import { Panel, ResizeHandle, SplitPane } from 'mpr-ui-framework'
|
||||
import 'mpr-ui-framework/src/tokens.css'
|
||||
import LogPanel from './panels/LogPanel.vue'
|
||||
@@ -10,7 +10,7 @@ import BrandTablePanel from './panels/BrandTablePanel.vue'
|
||||
import TimelinePanel from './panels/TimelinePanel.vue'
|
||||
import CostStatsPanel from './panels/CostStatsPanel.vue'
|
||||
import SourceSelector from './panels/SourceSelector.vue'
|
||||
import StageConfigSliders from './components/StageConfigSliders.vue'
|
||||
import StageConfig from './components/StageConfig.vue'
|
||||
import FrameStrip from './components/FrameStrip.vue'
|
||||
import { usePipelineStore } from './stores/pipeline'
|
||||
import { useSSEConnection } from './composables/useSSEConnection'
|
||||
@@ -41,9 +41,14 @@ const {
|
||||
// Editor overlays + CV result accumulation
|
||||
const {
|
||||
editorOverlays, editorBoxes,
|
||||
updateDisplayForFrame, onReplayResult,
|
||||
updateDisplayForFrame, onReplayResult, setActiveStage,
|
||||
} = useEditorState(currentFrameRef)
|
||||
|
||||
// Set active stage when editor opens
|
||||
watch(() => pipeline.editorStage, (stage) => {
|
||||
if (stage) setActiveStage(stage)
|
||||
}, { immediate: true })
|
||||
|
||||
// Wire checkpoint frame change to editor display update
|
||||
function setCheckpointFrame(index: number) {
|
||||
cpSetFrame(index)
|
||||
@@ -178,7 +183,7 @@ function onJobStarted(newJobId: string, opts?: { pauseAfterStage?: boolean }) {
|
||||
</template>
|
||||
<template #second>
|
||||
<div class="editor-sliders">
|
||||
<StageConfigSliders
|
||||
<StageConfig
|
||||
v-if="pipeline.editorStage"
|
||||
:stage="pipeline.editorStage"
|
||||
:job-id="jobId"
|
||||
@@ -206,20 +211,18 @@ function onJobStarted(newJobId: string, opts?: { pauseAfterStage?: boolean }) {
|
||||
|
||||
<div class="editor-bottom">
|
||||
<div class="overlay-controls">
|
||||
<template v-if="editorOverlays.length > 0">
|
||||
<label v-for="(overlay, idx) in editorOverlays" :key="idx" class="overlay-toggle">
|
||||
<input type="checkbox" v-model="overlay.visible" />
|
||||
<span class="overlay-label">{{ overlay.label }}</span>
|
||||
<input
|
||||
type="range"
|
||||
min="0" max="1" step="0.05"
|
||||
:value="overlay.opacity ?? 0.5"
|
||||
@input="(e: Event) => overlay.opacity = Number((e.target as HTMLInputElement).value)"
|
||||
class="opacity-slider"
|
||||
/>
|
||||
<span class="opacity-value">{{ Math.round((overlay.opacity ?? 0.5) * 100) }}%</span>
|
||||
</label>
|
||||
</template>
|
||||
<label v-for="(overlay, idx) in editorOverlays" :key="idx" class="overlay-toggle">
|
||||
<input type="checkbox" v-model="overlay.visible" />
|
||||
<span class="overlay-label">{{ overlay.label }}</span>
|
||||
<input
|
||||
type="range"
|
||||
min="0" max="1" step="0.05"
|
||||
:value="overlay.opacity ?? 0.5"
|
||||
@input="(e: Event) => overlay.opacity = Number((e.target as HTMLInputElement).value)"
|
||||
class="opacity-slider"
|
||||
/>
|
||||
<span class="opacity-value">{{ Math.round((overlay.opacity ?? 0.5) * 100) }}%</span>
|
||||
</label>
|
||||
</div>
|
||||
<button class="editor-close" @click="pipeline.closeEditor()">✕ Close</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user