summaryrefslogtreecommitdiff
path: root/internal/client/ui/core
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-01-12 18:55:27 +0200
committerKyren223 <Kyren223@proton.me>2025-01-12 18:55:27 +0200
commit2a79887c154c17c03f77e817b41e85279aeb567c (patch)
treee5be33a4bfd86e637390541dea6e402f69fc29fc /internal/client/ui/core
parentbff19b516e69284b0a96087a094a9d811d630b85 (diff)
Changed i in networkslist to a and i is now "copy id" for the selected
network
Diffstat (limited to 'internal/client/ui/core')
-rw-r--r--internal/client/ui/core/core.go12
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