mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
add submodules context
This commit is contained in:
21
pkg/gui/presentation/submodules.go
Normal file
21
pkg/gui/presentation/submodules.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package presentation
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
func GetSubmoduleListDisplayStrings(submodules []*models.SubmoduleConfig) [][]string {
|
||||
lines := make([][]string, len(submodules))
|
||||
|
||||
for i := range submodules {
|
||||
lines[i] = getSubmoduleDisplayStrings(submodules[i])
|
||||
}
|
||||
|
||||
return lines
|
||||
}
|
||||
|
||||
func getSubmoduleDisplayStrings(s *models.SubmoduleConfig) []string {
|
||||
return []string{utils.ColoredString(s.Name, theme.DefaultTextColor)}
|
||||
}
|
||||
Reference in New Issue
Block a user