gui: gray indicators and 'inactive' label for paused sessions
- Agent dots in tree are gray when parent session is paused - Top state indicator is gray when viewing agent in paused session - Top state label shows 'inactive' instead of agent state when paused
This commit is contained in:
parent
2b19cafc50
commit
3d739a9560
16
gui/main.qml
16
gui/main.qml
|
|
@ -173,6 +173,7 @@ ApplicationWindow {
|
|||
var displayLabel = agentCount > 0 ? sessionName + " (" + agentCount + ")" : sessionName
|
||||
var wasExpanded = sessionExpandedCache[sessionId] !== undefined ? sessionExpandedCache[sessionId] : true
|
||||
sessionExpandedCache[sessionId] = wasExpanded
|
||||
var isPaused = sess.paused || false
|
||||
|
||||
sessionTreeModel.append({
|
||||
type: "session",
|
||||
|
|
@ -183,7 +184,8 @@ ApplicationWindow {
|
|||
model: sess.model || "",
|
||||
displayName: displayLabel,
|
||||
baseName: sessionName,
|
||||
connectionColor: computeConnectionColor(sess)
|
||||
connectionColor: computeConnectionColor(sess),
|
||||
paused: isPaused
|
||||
})
|
||||
|
||||
var agentIds = []
|
||||
|
|
@ -198,7 +200,8 @@ ApplicationWindow {
|
|||
state: agent.state || "idle",
|
||||
connected: agent.connected,
|
||||
displayName: agent.name,
|
||||
parentExpanded: wasExpanded
|
||||
parentExpanded: wasExpanded,
|
||||
parentPaused: isPaused
|
||||
})
|
||||
agentIds.push(agent.id)
|
||||
}
|
||||
|
|
@ -1125,6 +1128,8 @@ ApplicationWindow {
|
|||
if (cc === "red") return "#f44336"
|
||||
return "#9e9e9e"
|
||||
}
|
||||
// Agent: gray if parent session is paused
|
||||
if (parentPaused) return "#9e9e9e"
|
||||
// Agent: use state role from model
|
||||
var s = state || "idle"
|
||||
if (s === "idle") return "#4caf50"
|
||||
|
|
@ -1181,6 +1186,7 @@ ApplicationWindow {
|
|||
width: 10; height: 10; radius: 5
|
||||
color: {
|
||||
if (!ollie.activeAgentId) return "#9e9e9e" // gray when no agent
|
||||
if (ollie.activeSessionId && ollie.isSessionPaused(ollie.activeSessionId)) return "#9e9e9e" // gray when paused
|
||||
if (ollie.activeState === "idle") return "#4caf50"
|
||||
if (ollie.activeState.startsWith("calling")) return "#ff9800"
|
||||
return "#2196f3"
|
||||
|
|
@ -1188,7 +1194,11 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
Label {
|
||||
text: ollie.activeAgentId ? ollie.activeState : ""
|
||||
text: {
|
||||
if (!ollie.activeAgentId) return ""
|
||||
if (ollie.activeSessionId && ollie.isSessionPaused(ollie.activeSessionId)) return "inactive"
|
||||
return ollie.activeState
|
||||
}
|
||||
opacity: 0.7
|
||||
font.pointSize: theme.fontSize > 0 ? theme.fontSize * 0.85 : 11
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue