diff options
author | mjarkk <mkopenga@gmail.com> | 2021-07-27 15:00:37 +0200 |
---|---|---|
committer | mjarkk <mkopenga@gmail.com> | 2021-07-30 15:14:46 +0200 |
commit | 79848087bccd5c87af1dbb44a39753aad1346f8b (patch) | |
tree | 07e4b6eb4b7ed5fdcbde8d697a214b647ddd0536 /pkg/gui/status_panel.go | |
parent | a3b820fb5f20f4a24028ecbf285d54bbaa7b6974 (diff) |
Switch to github.com/gookit/color for terminal colors
Diffstat (limited to 'pkg/gui/status_panel.go')
-rw-r--r-- | pkg/gui/status_panel.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go index adf1651ea..d936b3bd8 100644 --- a/pkg/gui/status_panel.go +++ b/pkg/gui/status_panel.go @@ -4,10 +4,10 @@ import ( "fmt" "strings" - "github.com/fatih/color" "github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/constants" "github.com/jesseduffield/lazygit/pkg/gui/presentation" + "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -28,10 +28,10 @@ func (gui *Gui) refreshStatus() { } if gui.GitCommand.WorkingTreeState() != commands.REBASE_MODE_NORMAL { - status += utils.ColoredString(fmt.Sprintf("(%s) ", gui.GitCommand.WorkingTreeState()), color.FgYellow) + status += style.FgYellow.Sprintf("(%s) ", gui.GitCommand.WorkingTreeState()) } - name := utils.ColoredString(currentBranch.Name, presentation.GetBranchColor(currentBranch.Name)) + name := presentation.GetBranchColor(currentBranch.Name).Sprint(currentBranch.Name) repoName := utils.GetCurrentRepoName() status += fmt.Sprintf("%s → %s ", repoName, name) @@ -94,8 +94,6 @@ func (gui *Gui) handleStatusSelect() error { return nil } - magenta := color.New(color.FgMagenta) - dashboardString := strings.Join( []string{ lazygitTitle(), @@ -105,7 +103,7 @@ func (gui *Gui) handleStatusSelect() error { fmt.Sprintf("Tutorial: %s", constants.Links.Docs.Tutorial), fmt.Sprintf("Raise an Issue: %s", constants.Links.Issues), fmt.Sprintf("Release Notes: %s", constants.Links.Releases), - magenta.Sprintf("Become a sponsor (github is matching all donations for 12 months): %s", constants.Links.Donate), // caffeine ain't free + style.FgMagenta.Sprintf("Become a sponsor (github is matching all donations for 12 months): %s", constants.Links.Donate), // caffeine ain't free }, "\n\n") return gui.refreshMainViews(refreshMainOpts{ |