diff --git a/NucleicRemote/NucleicRemote/Views/Theme.swift b/NucleicRemote/NucleicRemote/Views/Theme.swift index e50b5fd..89799be 100644 --- a/NucleicRemote/NucleicRemote/Views/Theme.swift +++ b/NucleicRemote/NucleicRemote/Views/Theme.swift @@ -313,6 +313,25 @@ struct KeyboardDismissable: ViewModifier { } } +/// A floating Liquid Glass surface for bars that hover over scrolling content (the session +/// chat bar, approval card). Real `glassEffect` on iOS 26; an ultra-thin material with a +/// hairline edge on earlier systems so the bar still reads as a translucent layer. +struct GlassSurface: ViewModifier { + var cornerRadius: CGFloat = 24 + func body(content: Content) -> some View { + if #available(iOS 26.0, *) { + content.glassEffect(.regular, in: .rect(cornerRadius: cornerRadius, style: .continuous)) + } else { + content + .background(.ultraThinMaterial, + in: RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)) + .overlay( + RoundedRectangle(cornerRadius: cornerRadius, style: .continuous) + .strokeBorder(Color.primary.opacity(0.08), lineWidth: 1)) + } + } +} + /// A lifted card surface with a hairline border — the mobile echo of `AppTheme.surface`. struct CardBackground: ViewModifier { var padding: CGFloat = 14