1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

feat(gui): show commit icons

This commit is contained in:
Ryooooooga
2022-04-23 10:41:40 +09:00
parent b07aeda5a6
commit cb13fe7f46
5 changed files with 34 additions and 10 deletions

View File

@ -0,0 +1,14 @@
package icons
import "github.com/jesseduffield/lazygit/pkg/commands/models"
const BRANCH_ICON = "\ufb2b" // שׂ
const COMMIT_ICON = "\ufc16" // ﰖ
const MERGE_COMMIT_ICON = "\ufb2c" // שּׁ
func IconForCommit(commit *models.Commit) string {
if len(commit.Parents) > 1 {
return MERGE_COMMIT_ICON
}
return COMMIT_ICON
}

View File

@ -0,0 +1,11 @@
package icons
var isIconEnabled = false
func IsIconEnabled() bool {
return isIconEnabled
}
func SetIconEnabled(showIcons bool) {
isIconEnabled = showIcons
}