feat: 增加账号未初始化提示登录重新初始化

This commit is contained in:
2025-12-03 03:08:26 -08:00
parent c87d5d4d38
commit 33b9cd34f1
2 changed files with 83 additions and 41 deletions
+5 -2
View File
@@ -208,7 +208,10 @@ class VPNManager: ObservableObject {
}
func disconnect() {
guard state == .connected else { return }
manager.connection.stopVPNTunnel()
if state != .disconnected && state != .invalid {
manager.connection.stopVPNTunnel()
} else {
alert = VPNManagerAlert(alert: nil, message: nil)
}
}
}