From 328a929a8868c9ce9613feea265c64a5369709a4 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 27 Nov 2024 10:10:58 +0200 Subject: Fixed client-side issues after refactoring --- internal/client/ui/core/networkcreation/networkcreation.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'internal/client/ui/core') 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) } -- cgit v1.3.1