UI: iOS: Show on-demand state in 'Status' if there are on-demand rules
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
03ef79c0fd
commit
147ac02f0d
|
@ -57,6 +57,7 @@
|
||||||
"tunnelStatusWaiting" = "Waiting";
|
"tunnelStatusWaiting" = "Waiting";
|
||||||
|
|
||||||
"tunnelStatusAddendumOnDemand" = " (On Demand)";
|
"tunnelStatusAddendumOnDemand" = " (On Demand)";
|
||||||
|
"tunnelStatusOnDemandDisabled" = "On Demand Disabled";
|
||||||
|
|
||||||
"macToggleStatusButtonActivate" = "Activate";
|
"macToggleStatusButtonActivate" = "Activate";
|
||||||
"macToggleStatusButtonActivating" = "Activating…";
|
"macToggleStatusButtonActivating" = "Activating…";
|
||||||
|
|
|
@ -365,6 +365,11 @@ extension TunnelDetailTableViewController {
|
||||||
cell.switchView.isUserInteractionEnabled = (status == .inactive || status == .active)
|
cell.switchView.isUserInteractionEnabled = (status == .inactive || status == .active)
|
||||||
cell.isEnabled = (status == .inactive || status == .active)
|
cell.isEnabled = (status == .inactive || status == .active)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if tunnel.hasOnDemandRules && !isOnDemandEngaged && status == .inactive {
|
||||||
|
text = tr("tunnelStatusOnDemandDisabled")
|
||||||
|
}
|
||||||
|
|
||||||
cell.textLabel?.text = text
|
cell.textLabel?.text = text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue