Skip to content

Commit

Permalink
Use a bubble tea specific name
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Harris <echarris@smcm.edu>
  • Loading branch information
eharris128 committed Sep 18, 2024
1 parent 580334e commit 24ff10a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/app/master/command/tui/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ var CLI = &cli.Command{
return command.ErrNoGlobalParams
}

m, _ := home.InitialModel(gcvalues)
tui.RunTUI(m, false)
initialTUI, _ := home.InitialTUI(gcvalues)
tui.RunTUI(initialTUI, false)
return nil
},
}
2 changes: 2 additions & 0 deletions pkg/app/master/tui/debug/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch {
case key.Matches(msg, keys.Global.Quit):
return m, tea.Quit
// NOTE -> We should only support this back navigation,
// if the images tui is not standalone
case key.Matches(msg, keys.Global.Back):
return common.ModelsInstance.Home, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/master/tui/home/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Model struct {
Gcvalues *command.GenericParams
}

func InitialModel(gcvalues *command.GenericParams) (tea.Model, tea.Cmd) {
func InitialTUI(gcvalues *command.GenericParams) (tea.Model, tea.Cmd) {
m := &Model{Gcvalues: gcvalues}

return m, nil
Expand Down
5 changes: 3 additions & 2 deletions pkg/app/master/tui/images/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/charmbracelet/lipgloss/table"
"github.com/dustin/go-humanize"
"github.com/mintoolkit/mint/pkg/app/master/tui/common"
"github.com/mintoolkit/mint/pkg/app/master/tui/home"
"github.com/mintoolkit/mint/pkg/app/master/tui/keys"
"github.com/mintoolkit/mint/pkg/crt"
"github.com/mintoolkit/mint/pkg/crt/docker/dockerutil"
Expand Down Expand Up @@ -99,8 +98,10 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch {
case key.Matches(msg, keys.Global.Quit):
return m, tea.Quit
// NOTE -> We should only support this back navigation,
// if the images tui is not standalone
case key.Matches(msg, keys.Global.Back):
return home.InitialModel()
return common.ModelsInstance.Home, nil
}
}
return m, nil
Expand Down

0 comments on commit 24ff10a

Please sign in to comment.