diff --git a/Sources/WireGuardApp/Base.lproj/Localizable.strings b/Sources/WireGuardApp/Base.lproj/Localizable.strings index 87935d1..0e24ed3 100644 --- a/Sources/WireGuardApp/Base.lproj/Localizable.strings +++ b/Sources/WireGuardApp/Base.lproj/Localizable.strings @@ -57,6 +57,7 @@ "tunnelStatusWaiting" = "Waiting"; "tunnelStatusAddendumOnDemand" = " (On Demand)"; +"tunnelStatusOnDemandDisabled" = "On Demand Disabled"; "macToggleStatusButtonActivate" = "Activate"; "macToggleStatusButtonActivating" = "Activating…"; diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift index 675adfd..196de0c 100644 --- a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift +++ b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelDetailTableViewController.swift @@ -365,6 +365,11 @@ extension TunnelDetailTableViewController { cell.switchView.isUserInteractionEnabled = (status == .inactive || status == .active) cell.isEnabled = (status == .inactive || status == .active) } + + if tunnel.hasOnDemandRules && !isOnDemandEngaged && status == .inactive { + text = tr("tunnelStatusOnDemandDisabled") + } + cell.textLabel?.text = text }