Skip to content

Commit

Permalink
Change menu information text to dim
Browse files Browse the repository at this point in the history
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
  • Loading branch information
jhrotko committed Mar 28, 2024
1 parent 6fe69b2 commit 549f1b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/formatter/colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var names = []string{

const (
BOLD = "1"
FAINT = "2"
DIM = "2"
ITALIC = "3"
UNDERLINE = "4"
)
Expand Down
2 changes: 0 additions & 2 deletions cmd/formatter/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ func (l *logConsumer) Err(container, message string) {
l.write(l.stderr, container, message)
}

var navColor = makeColorFunc("90")

func (l *logConsumer) write(w io.Writer, container, message string) {
if l.ctx.Err() != nil {
return
Expand Down
7 changes: 5 additions & 2 deletions cmd/formatter/shortcut.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ func (lk *LogKeyboard) printNavigationMenu() {
}

func (lk *LogKeyboard) navigationMenu() string {
var options string
var openDDInfo string
if lk.IsDockerDesktopActive {
openDDInfo = shortcutKeyColor("v") + navColor(" View in Docker Desktop")
Expand All @@ -201,7 +200,7 @@ func (lk *LogKeyboard) navigationMenu() string {
isEnabled = " Disable"
}
watchInfo = watchInfo + shortcutKeyColor("w") + navColor(isEnabled+" Watch")
return options + openDDInfo + watchInfo
return openDDInfo + watchInfo

Check warning on line 203 in cmd/formatter/shortcut.go

View check run for this annotation

Codecov / codecov/patch

cmd/formatter/shortcut.go#L203

Added line #L203 was not covered by tests
}

func (lk *LogKeyboard) clearNavigationMenu() {
Expand Down Expand Up @@ -325,3 +324,7 @@ func shortcutKeyColor(key string) string {
white := "255;255;255"
return ansiColor(foreground+";"+black+";"+background+";"+white, key, BOLD)
}

func navColor(key string) string {
return ansiColor(DIM, key)

Check warning on line 329 in cmd/formatter/shortcut.go

View check run for this annotation

Codecov / codecov/patch

cmd/formatter/shortcut.go#L328-L329

Added lines #L328 - L329 were not covered by tests
}

0 comments on commit 549f1b1

Please sign in to comment.