put node ID into the main menu.

Clicking on the menu item copies the node ID into the clipboard.
This commit is contained in:
Grant Limberg 2016-06-30 21:24:45 -07:00
commit a156fec25a
5 changed files with 130 additions and 2 deletions

View file

@ -9,6 +9,7 @@
import Cocoa
let networkUpdateKey = "com.zerotier.one.network-list"
let statusUpdateKey = "com.zerotier.one.status"
class NetworkMonitor: NSObject {
@ -58,6 +59,14 @@ class NetworkMonitor: NSObject {
self.internal_updateNetworkInfo()
}
}
ServiceCom.getNodeStatus() { nodeStatus -> Void in
NSOperationQueue.mainQueue().addOperationWithBlock() { () -> Void in
let nc = NSNotificationCenter.defaultCenter()
nc.postNotificationName(statusUpdateKey, object: nil, userInfo: ["status": nodeStatus])
}
}
}
func deleteSavedNetwork(nwid: String) {