mirror of
https://github.com/netbirdio/ios-client.git
synced 2026-09-23 09:28:33 -07:00
* feat(widget): replace action button with toggle switch control All connection states now render as a unified toggle-style control: green (connected), red (disconnected), orange with spinner (transitioning). * fix(widget+auth): toggle UI, VPN state sync, and login flow fixes * fix(widget+sdk): update Go SDK to fix/ios-debug-bundle, fix Control Center transitioning state and app disconnect flash * fix(widget): remove transitioning states, update toggle colors and UI * Change color indicator * fix(widget+auth): toggle UI, VPN state sync, and login flow fixes * fix framework version
27 lines
1.2 KiB
Swift
27 lines
1.2 KiB
Swift
import Foundation
|
|
|
|
enum WidgetConstants {
|
|
static let appGroupSuite = "group.io.netbird.app"
|
|
static let deepLinkConnect = URL(string: "netbird://connect")
|
|
static let deepLinkDisconnect = URL(string: "netbird://disconnect")
|
|
static let deepLinkLogin = URL(string: "netbird://login")
|
|
|
|
// UserDefaults keys (must match GlobalConstants in NetbirdKit)
|
|
static let keyVPNStatus = "netbird.widget.vpnStatus"
|
|
static let keyIP = "netbird.widget.ip"
|
|
static let keyFQDN = "netbird.widget.fqdn"
|
|
static let keyLoginRequired = "netbird.loginRequired"
|
|
// Active profile paths written by the main app so the widget intent can pass
|
|
// them to startVPNTunnel(options:) without the main app being in-process.
|
|
static let keyActiveConfigPath = "netbird.widget.activeConfigPath"
|
|
static let keyActiveStatePath = "netbird.widget.activeStatePath"
|
|
|
|
static let pollInterval: TimeInterval = 0.3
|
|
static let pollTimeout: TimeInterval = 5.0
|
|
static let timelineRefreshMinutes = 5
|
|
// Short refresh used when NE was mid-transition at load time so the widget
|
|
// recovers to the correct stable state as soon as NE settles.
|
|
static let transitionPollInterval: TimeInterval = 5.0
|
|
|
|
}
|