Skip to content

Commit

Permalink
feat: add start-tui command for interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
prnk28 committed Dec 11, 2024
1 parent 23f077c commit 305efbe
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 80 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,18 @@ logs-sonr: init-env
bin/process-compose process logs sonr --port $(PC_PORT_NUM) --follow

###############################################################################
### help ###
### Network Start/Stop ###
###############################################################################

.PHONY: deploy start stop restart status
.PHONY: deploy start start-tui stop restart status

start: build-hway init-env
bin/process-compose up --port $(PC_PORT_NUM) --log-file $(PC_LOG_FILE) --detached -f deploy/process-compose.yaml

stop: init-env
start-tui: build-hway init-env
bin/process-compose up --port $(PC_PORT_NUM) --log-file $(PC_LOG_FILE) -f deploy/process-compose.yaml

stop: init-env
bin/process-compose down --port $(PC_PORT_NUM)

restart: stop clean start
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ require (
github.com/strangelove-ventures/tokenfactory v0.50.0
github.com/stretchr/testify v1.10.0
golang.org/x/crypto v0.30.0
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.2
Expand Down Expand Up @@ -352,7 +353,6 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
Expand Down
14 changes: 9 additions & 5 deletions internal/gateway/handlers/register/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ import (
"github.com/labstack/echo/v4"
"github.com/onsonr/sonr/crypto/mpc"
"github.com/onsonr/sonr/pkg/common/response"
"golang.org/x/exp/rand"
)

func HandleCreateProfile(c echo.Context) error {
dat := CreateProfileData{
FirstNumber: 1,
LastNumber: 2,
}
return response.TemplEcho(c, ProfileFormView(dat))
return response.TemplEcho(c, ProfileFormView(randomCreateProfileData()))
}

func HandlePasskeyStart(c echo.Context) error {
Expand Down Expand Up @@ -50,3 +47,10 @@ func HandlePasskeyFinish(c echo.Context) error {
}
return response.TemplEcho(c, LoadingVaultView())
}

func randomCreateProfileData() CreateProfileData {
return CreateProfileData{
FirstNumber: rand.Intn(5) + 1,
LastNumber: rand.Intn(4) + 1,
}
}
30 changes: 0 additions & 30 deletions internal/gateway/handlers/register/ui/styles.templ

This file was deleted.

41 changes: 0 additions & 41 deletions internal/gateway/handlers/register/ui/styles_templ.go

This file was deleted.

0 comments on commit 305efbe

Please sign in to comment.