Skip to content

Commit

Permalink
fix: adding some minor tweaks (#26)
Browse files Browse the repository at this point in the history
Signed-off-by: Owen Rumney <[email protected]>

Signed-off-by: Owen Rumney <[email protected]>
  • Loading branch information
owenrumney authored Sep 16, 2022
1 parent 80c8bed commit 3fb2be5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions pkg/controllers/aws/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func layout(g *gocui.Gui) error {
servicesWidth := 0
viewNames := []string{widgets.Services, widgets.Account, widgets.Results, widgets.Menu, widgets.Status}
maxX, maxY := g.Size()
x := 0
Expand All @@ -26,18 +25,18 @@ func layout(g *gocui.Gui) error {

switch v.Name() {
case widgets.Account:
nextW = servicesWidth
nextW = maxX - 1
nextX = 0
nextH = 2
case widgets.Services:
servicesWidth = w
y = 3
case widgets.Status:
nextW = maxX - 1
y = maxY - 6
case widgets.Results:
nextW = maxX - 1
nextH = maxY - 7
y = 3
case widgets.Menu:
nextX = 0
y = maxY - 4
Expand Down
6 changes: 3 additions & 3 deletions pkg/widgets/announce.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ func (w *AnnouncementWidget) ConfigureKeys(*gocui.Gui) error {
if err := w.ctx.SetKeybinding(w.name, gocui.KeyEsc, gocui.ModNone, w.close); err != nil {
return err
}
if err := w.ctx.SetKeybinding(w.name, gocui.KeyEnter, gocui.ModNone, w.close); err != nil {
return err
}
// if err := w.ctx.SetKeybinding(w.name, gocui.KeyEnter, gocui.ModNone, w.close); err != nil {
// return err
// }

if err := w.ctx.SetKeybinding(w.name, 'q', gocui.ModNone, w.close); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion pkg/widgets/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (w *SettingsWidget) Draw() {
w.form.AddButton("Save", func(gui *gocui.Gui, view *gocui.View) error {

w.cfg.Debug = w.form.GetCheckBoxState(" Enable Debugging")
w.cfg.CacheDirectory = w.form.GetFieldText(" Cache Directory")
w.cfg.CacheDirectory = w.form.GetFieldText(" Trivy Cache")
w.cfg.Filesystem.ScanVulnerabilities = w.form.GetCheckBoxState(" Scan Vulnerabilities")
w.cfg.Filesystem.ScanMisconfiguration = w.form.GetCheckBoxState(" Scan Misconfigs")
w.cfg.Filesystem.ScanSecrets = w.form.GetCheckBoxState(" Show Secrets")
Expand Down

0 comments on commit 3fb2be5

Please sign in to comment.