mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
feat: add age on stash lines
This commit is contained in:
@ -3,6 +3,7 @@ package presentation
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/presentation/icons"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||
"github.com/samber/lo"
|
||||
)
|
||||
@ -21,10 +22,13 @@ func getStashEntryDisplayStrings(s *models.StashEntry, diffed bool) []string {
|
||||
textStyle = theme.DiffTerminalColor
|
||||
}
|
||||
|
||||
res := make([]string, 0, 2)
|
||||
res := make([]string, 0, 3)
|
||||
res = append(res, style.FgCyan.Sprint(s.Recency))
|
||||
|
||||
if icons.IsIconEnabled() {
|
||||
res = append(res, textStyle.Sprint(icons.IconForStash(s)))
|
||||
}
|
||||
|
||||
res = append(res, textStyle.Sprint(s.Name))
|
||||
return res
|
||||
}
|
||||
|
Reference in New Issue
Block a user