diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-11-27 10:10:58 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-11-27 10:10:58 +0200 |
| commit | 328a929a8868c9ce9613feea265c64a5369709a4 (patch) | |
| tree | b92fa8d52c67f7deff7aafc96c478e74c345f243 /internal/client/ui/core/networkcreation | |
| parent | 8ed2527a8879e01f4f3f741feebaf86fee2bf18d (diff) | |
Fixed client-side issues after refactoring
Diffstat (limited to 'internal/client/ui/core/networkcreation')
| -rw-r--r-- | internal/client/ui/core/networkcreation/networkcreation.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/internal/client/ui/core/networkcreation/networkcreation.go b/internal/client/ui/core/networkcreation/networkcreation.go index f0aad5e..081c1ce 100644 --- a/internal/client/ui/core/networkcreation/networkcreation.go +++ b/internal/client/ui/core/networkcreation/networkcreation.go @@ -7,10 +7,12 @@ import ( "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" + "github.com/kyren223/eko/internal/client/gateway" "github.com/kyren223/eko/internal/client/ui/colors" "github.com/kyren223/eko/internal/client/ui/core/networks" "github.com/kyren223/eko/internal/client/ui/field" "github.com/kyren223/eko/internal/client/ui/layouts/flex" + "github.com/kyren223/eko/internal/packet" "github.com/kyren223/eko/pkg/assert" ) @@ -334,6 +336,12 @@ func (m *Model) Select() tea.Cmd { return nil } - // TODO: send api request for creating the server - return nil + request := packet.CreateNetwork{ + Name: m.name.Input.Value(), + Icon: m.icon.Value(), + BgHexColor: "#" + m.bgColor.Value(), + FgHexColor: "#" + m.fgColor.Value(), + IsPublic: !m.private, + } + return gateway.Send(&request) } |
