diff options
Diffstat (limited to 'internal/client/ui')
| -rw-r--r-- | internal/client/ui/core/core.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/client/ui/core/core.go b/internal/client/ui/core/core.go index 10088bf..55a5925 100644 --- a/internal/client/ui/core/core.go +++ b/internal/client/ui/core/core.go @@ -6,6 +6,7 @@ import ( "log" "time" + "github.com/atotto/clipboard" "github.com/charmbracelet/bubbles/spinner" "github.com/charmbracelet/bubbles/timer" tea "github.com/charmbracelet/bubbletea" @@ -239,7 +240,7 @@ func (m *Model) updateConnected(msg tea.Msg) tea.Cmd { } } - case "i": + case "a": if m.focus == FocusNetworkList && m.networkJoinPopup == nil && m.networkCreationPopup == nil { popup := networkjoin.New() m.networkJoinPopup = &popup @@ -247,6 +248,15 @@ func (m *Model) updateConnected(msg tea.Msg) tea.Cmd { m.updatePopups(msg) } + case "i": + index := m.networkList.Index() + if m.focus == FocusNetworkList && index != networklist.PeersIndex { + networkId := state.NetworkId(index) + if networkId != nil { + _ = clipboard.WriteAll(networkId.String()) + } + } + case "esc": if m.networkCreationPopup != nil { m.networkCreationPopup = nil |
