Fix TV active toggle color when on-demand

This commit is contained in:
Davide 2024-12-10 17:29:56 +01:00
parent 9b86d129ef
commit a626722224
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
2 changed files with 10 additions and 3 deletions

View File

@ -145,10 +145,9 @@ private extension ActiveProfileView {
var toggleConnectionColor: Color {
switch tunnel.status {
case .inactive:
return theme.activeColor
return tunnel.currentProfile?.onDemand == true ? theme.disableColor : theme.enableColor
default:
return theme.errorColor
return theme.disableColor
}
}

View File

@ -64,6 +64,14 @@ public final class Theme: ObservableObject {
public internal(set) var errorColor: Color = .red
public var enableColor: Color {
activeColor
}
public var disableColor: Color {
errorColor
}
public internal(set) var upgradeColor: Color = .orange
public internal(set) var logoImage = "Logo"