SessionView: surface a "View only" badge in the chrome

When a connection is configured with viewOnly=true, the controller silently
drops every key, pointer, and scroll event. Without a visible indicator the
behavior looks like the keyboard is broken. Yellow capsule next to the
connection label makes it obvious.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey T
2026-04-16 23:17:10 -05:00
parent 4408bca53b
commit a21946ba2c

View File

@@ -112,6 +112,19 @@ public struct SessionView: View {
connectionLabel(controller: controller)
if controller.viewOnly {
HStack(spacing: 4) {
Image(systemName: "eye.fill")
.font(.caption2)
Text("View only")
.font(.caption.weight(.semibold))
}
.foregroundStyle(.yellow)
.padding(.horizontal, 10)
.padding(.vertical, 5)
.glassSurface(in: Capsule())
}
Spacer()
}
.padding(.horizontal, 12)