From cb25dc7b593711d4a0b9e1a1ae6235be12c5baa0 Mon Sep 17 00:00:00 2001 From: "Bat.bat" <45396585+williambj1@users.noreply.github.com> Date: Wed, 31 Jul 2024 19:17:00 +1000 Subject: [PATCH] Enhance WiFiConfigWindow - Show encryption type when unsupported - Select SSID field when manually joining other networks --- HeliPort/Appearance/WiFiConfigWindow.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/HeliPort/Appearance/WiFiConfigWindow.swift b/HeliPort/Appearance/WiFiConfigWindow.swift index 020258f..459e22d 100644 --- a/HeliPort/Appearance/WiFiConfigWindow.swift +++ b/HeliPort/Appearance/WiFiConfigWindow.swift @@ -366,7 +366,8 @@ class WiFiConfigWindow: NSWindow { func show() { guard !securityPop.title.isEmpty else { - Log.error("WiFiConfigWindow not shown due to unknown security type") + Log.error("WiFiConfigWindow not shown due to unsupported security type: " + + (networkInfo?.auth.security.description ?? "unknown")) return } makeKeyAndOrderFront(self) @@ -467,7 +468,11 @@ extension WiFiConfigWindow { gridView.row(at: .usernameRow).isHidden = true gridView.row(at: .passwordRow).isHidden = false gridView.row(at: .showPassRow).isHidden = false - passwdSecureBox.becomeFirstResponder() + if networkBox.isHidden || !networkBox.stringValue.isEmpty { + passwdSecureBox.becomeFirstResponder() + } else { + networkBox.becomeFirstResponder() + } case .wpa_1_2_Enterprise, .wpa_2_3_Enterprise, .wpa2Enterprise, @@ -479,6 +484,7 @@ extension WiFiConfigWindow { default: let alert = NSAlert() alert.messageText = .encryptionUnsupported + alert.informativeText = networkInfo?.auth.security.description ?? "" alert.alertStyle = .critical alert.runModal() return