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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user