diff options
Diffstat (limited to 'internal/client')
| -rw-r--r-- | internal/client/ui/core/core.go | 6 | ||||
| -rw-r--r-- | internal/client/ui/core/networkcreation/networkcreation.go | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/internal/client/ui/core/core.go b/internal/client/ui/core/core.go index fba3ddb..1f86121 100644 --- a/internal/client/ui/core/core.go +++ b/internal/client/ui/core/core.go @@ -144,7 +144,11 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case tea.KeyEnter: if m.networkCreationPopup != nil { - return m, m.networkCreationPopup.Select() + cmd := m.networkCreationPopup.Select() + if cmd != nil { + m.networkCreationPopup = nil + } + return m, cmd } default: diff --git a/internal/client/ui/core/networkcreation/networkcreation.go b/internal/client/ui/core/networkcreation/networkcreation.go index 081c1ce..b7f76d4 100644 --- a/internal/client/ui/core/networkcreation/networkcreation.go +++ b/internal/client/ui/core/networkcreation/networkcreation.go @@ -95,9 +95,6 @@ func New() Model { if strings.TrimSpace(s) == "" { return errors.New("cannot be empty") } - if strings.TrimSpace(s) != s { - return errors.New("no leading/trailing spaces") - } return nil } |
