Define NE configuration title format in Constants
This commit is contained in:
parent
619ff807fd
commit
c96e7e9d6e
|
@ -70,7 +70,7 @@ public final class AppContext: ObservableObject {
|
||||||
connectionObserver = ConnectionObserver(
|
connectionObserver = ConnectionObserver(
|
||||||
tunnel: tunnel,
|
tunnel: tunnel,
|
||||||
environment: tunnelEnvironment,
|
environment: tunnelEnvironment,
|
||||||
interval: constants.connection.refreshInterval
|
interval: constants.tunnel.refreshInterval
|
||||||
)
|
)
|
||||||
self.registry = registry
|
self.registry = registry
|
||||||
self.providerFactory = providerFactory
|
self.providerFactory = providerFactory
|
||||||
|
|
|
@ -91,7 +91,9 @@ public struct Constants: Decodable, Sendable {
|
||||||
public let timestamp: String
|
public let timestamp: String
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct Connection: Decodable, Sendable {
|
public struct Tunnel: Decodable, Sendable {
|
||||||
|
public let profileTitleFormat: String
|
||||||
|
|
||||||
public let refreshInterval: TimeInterval
|
public let refreshInterval: TimeInterval
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +152,7 @@ public struct Constants: Decodable, Sendable {
|
||||||
|
|
||||||
public let formats: Formats
|
public let formats: Formats
|
||||||
|
|
||||||
public let connection: Connection
|
public let tunnel: Tunnel
|
||||||
|
|
||||||
public let api: API
|
public let api: API
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
"formats": {
|
"formats": {
|
||||||
"timestamp": "yyyy-MM-dd HH:mm:ss"
|
"timestamp": "yyyy-MM-dd HH:mm:ss"
|
||||||
},
|
},
|
||||||
"connection": {
|
"tunnel": {
|
||||||
|
"profileTitleFormat": "Passepartout: %@",
|
||||||
"refreshInterval": 3.0
|
"refreshInterval": 3.0
|
||||||
},
|
},
|
||||||
"api": {
|
"api": {
|
||||||
|
|
|
@ -218,7 +218,7 @@ extension ProviderFactory {
|
||||||
|
|
||||||
private extension ProfileManager {
|
private extension ProfileManager {
|
||||||
static let sharedTitle: (Profile) -> String = {
|
static let sharedTitle: (Profile) -> String = {
|
||||||
"Passepartout: \($0.name)"
|
String(format: Constants.shared.tunnel.profileTitleFormat, $0.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue