diff --git a/ZeroTier One/AppDelegate.swift b/ZeroTier One/AppDelegate.swift index dc7a3b9ae..8e0cbf106 100644 --- a/ZeroTier One/AppDelegate.swift +++ b/ZeroTier One/AppDelegate.swift @@ -109,7 +109,13 @@ class AppDelegate: NSObject, NSApplicationDelegate { if networks.count > 0 { for net in networks { let id = String(net.nwid, radix: 16) - let networkName = "\(id) (\(net.name))" + var networkName = "" + if net.name.isEmpty { + networkName = "\(id)" + } + else { + networkName = "\(id) (\(net.name))" + } let item = NSMenuItem(title: networkName, action: #selector(AppDelegate.toggleNetwork(_:)), keyEquivalent: "") diff --git a/ZeroTier One/ServiceCom.swift b/ZeroTier One/ServiceCom.swift index 21d5529c6..23c194c27 100644 --- a/ZeroTier One/ServiceCom.swift +++ b/ZeroTier One/ServiceCom.swift @@ -133,10 +133,10 @@ class ServiceCom: NSObject { let status = httpResponse.statusCode if status == 200 { - print("join ok") + NSLog("join ok") } else { - print("join error: \(status)") + NSLog("join error: \(status)") } } @@ -158,10 +158,10 @@ class ServiceCom: NSObject { let status = httpResponse.statusCode if status == 200 { - print("leave ok") + NSLog("leave ok") } else { - print("leave error: \(status)") + NSLog("leave error: \(status)") } }