From bc96b9c056e72a16f66f8008396b3e8e0f1ed628 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Thu, 2 Jul 2026 19:21:11 -0700 Subject: [PATCH] Review Feature Access Nucleic-Session: 85A6233A-F3F6-44B2-AD0B-261D49EE9C35 Co-authored-by: Nucleic --- .../NucleicRemote/Views/BuildBanner.swift | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/BuildBanner.swift b/NucleicRemote/NucleicRemote/Views/BuildBanner.swift index 500e9da..e2b9f79 100644 --- a/NucleicRemote/NucleicRemote/Views/BuildBanner.swift +++ b/NucleicRemote/NucleicRemote/Views/BuildBanner.swift @@ -131,3 +131,33 @@ struct BuildBanner: View { } } } + +/// A slim strip shown while the app is in offline demo mode, so sample data is never mistaken +/// for a live connection to a Mac. Sits under the `BuildBanner` in `RootView`. +struct DemoBanner: View { + @EnvironmentObject var store: RemoteStore + + var body: some View { + if store.demoMode { + HStack(spacing: 8) { + Image(systemName: "play.circle.fill").font(.system(size: 14, weight: .bold)) + Text("Demo — sample data, no Mac connected") + .font(.footnote.weight(.semibold)) + .lineLimit(1) + Spacer(minLength: 8) + Text("DEMO") + .font(.caption2.weight(.heavy)) + .tracking(0.9) + .padding(.horizontal, 6) + .padding(.vertical, 2) + .background(.white.opacity(0.18), in: .capsule) + } + .foregroundStyle(.white.opacity(0.95)) + .padding(.horizontal, 12) + .padding(.vertical, 5) + .frame(maxWidth: .infinity) + .background(Color(red: 0.36, green: 0.36, blue: 0.42)) + .accessibilityLabel("Demo mode — sample data, not connected to a Mac.") + } + } +}