mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
misc cleanup
This commit is contained in:
parent
b5a90a437b
commit
b256111a17
2 changed files with 11 additions and 5 deletions
|
@ -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: "")
|
||||
|
||||
|
|
|
@ -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)")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue