mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-18 18:56:24 +00:00
copy node ID by clicking on node ID menu item
This commit is contained in:
parent
a8847de910
commit
f61c5836b2
@ -27,7 +27,7 @@
|
||||
<ContextMenu>
|
||||
<ContextMenu.ItemsSource>
|
||||
<CompositeCollection>
|
||||
<MenuItem Header="Node ID: abeb9f9bc5"
|
||||
<MenuItem Header="Node ID: unknown"
|
||||
Click="ToolbarItem_NodeIDClicked"
|
||||
x:Name="nodeIdMenuItem"/>
|
||||
<Separator/>
|
||||
|
@ -44,6 +44,8 @@ namespace WinUI
|
||||
set { _networkCollection = value; }
|
||||
}
|
||||
|
||||
private string nodeId;
|
||||
|
||||
public ToolbarItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -94,6 +96,7 @@ namespace WinUI
|
||||
{
|
||||
nodeIdMenuItem.Header = "Node ID: " + status.Address;
|
||||
nodeIdMenuItem.IsEnabled = true;
|
||||
nodeId = status.Address;
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -110,7 +113,7 @@ namespace WinUI
|
||||
|
||||
private void ToolbarItem_NodeIDClicked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
// TODO: Copy Node ID to clipboard
|
||||
Clipboard.SetText(nodeId);
|
||||
}
|
||||
|
||||
private void ToolbarItem_ShowNetworksClicked(object sender, System.Windows.RoutedEventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user