From a21946ba2c424c2e2607182824f92af8823dfc31 Mon Sep 17 00:00:00 2001 From: Trey T Date: Thu, 16 Apr 2026 23:17:10 -0500 Subject: [PATCH] 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) --- .../VNCUI/Sources/VNCUI/Session/SessionView.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift b/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift index c58433d..b61fa1b 100644 --- a/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift +++ b/Packages/VNCUI/Sources/VNCUI/Session/SessionView.swift @@ -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)