Skip to content

Commit

Permalink
feat: improve ux
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahanmmi committed Apr 26, 2024
1 parent 0ba5e5f commit eebebb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/optimize/view/ec2_instance_detail.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func NewEc2InstanceDetail(item OptimizationItem, close func()) *Ec2InstanceDetai
model.help = HelpView{
lines: []string{
"↑/↓: move",
"esc: back to ec2 instance list",
"esc/←: back to ec2 instance list",
"q/ctrl+c: exit",
},
height: 0,
Expand All @@ -430,7 +430,7 @@ func (m *Ec2InstanceDetail) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg.String() {
case "q":
return m, tea.Quit
case "esc":
case "esc", "left":
m.close()
}
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/optimize/view/ec2_instance_optimizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewEC2InstanceOptimizations(instanceChan chan OptimizationItem) *Ec2Instanc
help: HelpView{
lines: []string{
"↑/↓: move",
"enter: see details",
"enter/→: see details",
"p: change preferences for one item",
"P: change preferences for all items",
"q/ctrl+c: exit",
Expand Down Expand Up @@ -222,7 +222,7 @@ func (m *Ec2InstanceOptimizations) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}, m.Width)
initCmd = m.prefConf.Init()
m.UpdateResponsive()
case "enter":
case "enter", "right":
if len(m.table.SelectedRow()) == 0 {
break
}
Expand Down

0 comments on commit eebebb8

Please sign in to comment.