mirror of
https://github.com/Kyren223/eko.git
synced 2026-07-20 02:21:03 +00:00
Added "i" to copy user ID in user signals
This commit is contained in:
@@ -756,7 +756,7 @@ func (m *Model) renderMessages(screenHeight int) string {
|
||||
frequencies := state.State.Frequencies[*networkId]
|
||||
frequencyId := frequencies[m.frequencyIndex].ID
|
||||
btree = state.State.Messages[frequencyId]
|
||||
} else {
|
||||
} else if m.receiverIndex != -1 {
|
||||
receiverId := state.Data.Peers[m.receiverIndex]
|
||||
btree = state.State.Messages[receiverId]
|
||||
}
|
||||
|
||||
@@ -213,6 +213,7 @@ func (m HelpPopup) HelpPeerList() [][]Keymap {
|
||||
{"T", "Trust/untrust user"},
|
||||
{"B", "Block user"},
|
||||
{"U", "Unblock user"},
|
||||
{"i", "Copy your user ID"},
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/atotto/clipboard"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/kyren223/eko/internal/client/gateway"
|
||||
@@ -152,6 +153,9 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||
case "ctrl+d":
|
||||
m.SetIndex(m.index + m.height/2)
|
||||
|
||||
case "i":
|
||||
_ = clipboard.WriteAll(strconv.FormatInt(int64(*state.UserID), 10))
|
||||
|
||||
case "c":
|
||||
if m.index == -1 {
|
||||
return m, nil
|
||||
|
||||
Reference in New Issue
Block a user