You've already forked ios-client
mirror of
https://github.com/netbirdio/ios-client.git
synced 2026-05-22 17:10:12 -07:00
315283822c
* Add Home Screen widget with VPN toggle and refactor app activation logic - Add NetBirdWidgetExtension target with small/medium widget sizes - Support direct connect/disconnect from widget via interactive buttons (iOS 17+) - Detect missing VPN config or login-required state and open app via deep link - Poll for stable VPN state after toggle to prevent loader getting stuck - Add widget shared state keys to GlobalConstants and sync status from MainViewModel - Fix false "authentication required" alert on app resume after widget disconnect - Deduplicate app activation logic into shared startActivation/stopActivation - Extract polling helpers: updateDetailsIfChanged, updatePeersIfChanged, applyExtensionStatus
20 lines
466 B
Swift
20 lines
466 B
Swift
import SwiftUI
|
|
|
|
struct StatusIndicator: View {
|
|
let status: WidgetVPNStatus
|
|
var fontSize: CGFloat = 13
|
|
|
|
var body: some View {
|
|
HStack(spacing: 6) {
|
|
Circle()
|
|
.fill(status.statusColor)
|
|
.frame(width: 8, height: 8)
|
|
|
|
Text(status.displayText)
|
|
.font(.system(size: fontSize, weight: .medium))
|
|
.foregroundColor(.primary)
|
|
.lineLimit(1)
|
|
}
|
|
}
|
|
}
|