1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

feat(gui): show branch icons

This commit is contained in:
Ryooooooga
2022-04-23 10:57:51 +09:00
parent cb13fe7f46
commit 11d0e7e17d
4 changed files with 45 additions and 8 deletions

View File

@ -1,10 +1,29 @@
package icons
import "github.com/jesseduffield/lazygit/pkg/commands/models"
import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
)
const BRANCH_ICON = "\ufb2b" // שׂ
const COMMIT_ICON = "\ufc16" //
const MERGE_COMMIT_ICON = "\ufb2c" //
const BRANCH_ICON = "\ufb2b" // שׂ
const DETACHED_HEAD_ICON = "\ue729" //
const TAG_ICON = "\uf02b" //
const COMMIT_ICON = "\ufc16" // ﰖ
const MERGE_COMMIT_ICON = "\ufb2c" // שּׁ
func IconForBranch(branch *models.Branch) string {
if branch.DisplayName != "" {
return DETACHED_HEAD_ICON
}
return BRANCH_ICON
}
func IconForRemoteBranch(branch *models.RemoteBranch) string {
return BRANCH_ICON
}
func IconForTag(tag *models.Tag) string {
return TAG_ICON
}
func IconForCommit(commit *models.Commit) string {
if len(commit.Parents) > 1 {