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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user