Skip to content

Commit

Permalink
feat: spinner during repo url validation
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Dagelic <[email protected]>
  • Loading branch information
idagelic committed Sep 26, 2024
1 parent 5f172db commit 3fa931e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/views/workspace/create/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/charmbracelet/huh"
"github.com/charmbracelet/lipgloss"
views_util "github.com/daytonaio/daytona/pkg/views/util"
)

const maxWidth = 160
Expand Down Expand Up @@ -79,9 +80,11 @@ func GetRepositoryFromUrlInput(multiProject bool, projectOrder int, apiClient *a
Value(&initialRepoUrl).
Key("initialProjectRepo").
Validate(func(str string) error {
var err error
repo, err = validateRepoUrl(str, apiClient)
return err
return views_util.WithInlineSpinner("Validating", func() error {
var err error
repo, err = validateRepoUrl(str, apiClient)
return err
})
})

dTheme := views.GetCustomTheme()
Expand Down

0 comments on commit 3fa931e

Please sign in to comment.