mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 02:27:38 -07:00
put node ID into the main menu.
Clicking on the menu item copies the node ID into the clipboard.
This commit is contained in:
parent
fe725f9995
commit
a156fec25a
5 changed files with 130 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue