fix: AgentModal bei Klick auf Card verdrahtet
- @select Handler auf TeamNetwork - selectedAgent State + onAgentSelect() - AgentModal importiert und gerendert (v-if selectedAgent) - Close via X oder Overlay
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted } from 'vue'
|
||||
import { onMounted, onUnmounted, ref } from 'vue'
|
||||
import MissionCard from '../components/dashboard/MissionCard.vue'
|
||||
import OperationsFeed from '../components/dashboard/OperationsFeed.vue'
|
||||
import TeamNetwork from '../components/dashboard/TeamNetwork.vue'
|
||||
import ChatPanel from '../components/dashboard/ChatPanel.vue'
|
||||
import QueuePanel from '../components/dashboard/QueuePanel.vue'
|
||||
import AgentModal from '../components/dashboard/AgentModal.vue'
|
||||
import { useDashboardData } from '../composables/useDashboardData'
|
||||
import type { AgentNodeData } from '../../composables/useDashboardData'
|
||||
|
||||
const {
|
||||
agents, missions, feedEntries, chatMessages,
|
||||
@@ -14,6 +16,13 @@ const {
|
||||
sendChat, removeQueueItem, moveQueueItem, changeQueuePriority,
|
||||
} = useDashboardData()
|
||||
|
||||
const selectedAgent = ref<AgentNodeData | null>(null)
|
||||
|
||||
function onAgentSelect(id: string) {
|
||||
const agent = agents.value.find(a => a.id === id)
|
||||
if (agent) selectedAgent.value = agent
|
||||
}
|
||||
|
||||
onMounted(startRuntime)
|
||||
onUnmounted(stopRuntime)
|
||||
|
||||
@@ -62,6 +71,7 @@ function onQueueExecuteNow(id: string): void {
|
||||
:iris-runtime="irisRuntime"
|
||||
:get-agent-runtime="getAgentRuntime"
|
||||
:iris-focus="irisFocus"
|
||||
@select="onAgentSelect"
|
||||
/>
|
||||
|
||||
<!-- Legend -->
|
||||
@@ -84,6 +94,13 @@ function onQueueExecuteNow(id: string): void {
|
||||
<ChatPanel :messages="chatMessages" :iris-busy="irisBusy" :iris-focus="irisFocus" @send="onChatSend" />
|
||||
<QueuePanel :items="queue" @remove="removeQueueItem" @move-up="onQueueMoveUp" @move-down="onQueueMoveDown" @change-priority="changeQueuePriority" @execute-now="onQueueExecuteNow" />
|
||||
</div>
|
||||
|
||||
<AgentModal
|
||||
v-if="selectedAgent"
|
||||
:agent="selectedAgent"
|
||||
:runtime="getAgentRuntime(selectedAgent.id)"
|
||||
@close="selectedAgent = null"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user