Improve Start/Stop button

This commit is contained in:
世界
2025-11-26 22:25:52 +08:00
parent 32f5bf1f3b
commit 4f0d1098e6
10 changed files with 176 additions and 45 deletions
+3
View File
@@ -10,11 +10,13 @@ public class ExtensionProfile: ObservableObject {
private var observer: Any?
@Published public var status: NEVPNStatus
@Published public var connectedDate: Date?
public init(_ manager: NEVPNManager) {
self.manager = manager
connection = manager.connection
status = manager.connection.status
connectedDate = manager.connection.connectedDate
}
public func register() {
@@ -28,6 +30,7 @@ public class ExtensionProfile: ObservableObject {
}
self.connection = notification.object as! NEVPNConnection
self.status = self.connection.status
self.connectedDate = self.connection.connectedDate
}
}