mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	Use github icon instead of just coloring the branch icon
This commit is contained in:
		| @@ -127,7 +127,7 @@ func getBranchDisplayStrings( | ||||
| 	pr, hasPr := prs[b.Name] | ||||
| 	if hasPr { | ||||
| 		if icons.IsIconEnabled() { | ||||
| 			res = append(res, prColor(pr.State).Sprint(icons.IconForBranch(b))) | ||||
| 			res = append(res, prColor(pr.State).Sprint(icons.IconForRemoteUrl(pr.Url))) | ||||
| 		} else { | ||||
| 			res = append(res, prColor(pr.State).Sprint("⬤")) | ||||
| 		} | ||||
|   | ||||
| @@ -79,6 +79,15 @@ func IconForRemote(remote *models.Remote) string { | ||||
| 	return DEFAULT_REMOTE_ICON | ||||
| } | ||||
|  | ||||
| func IconForRemoteUrl(url string) string { | ||||
| 	for domain, icon := range remoteIcons { | ||||
| 		if strings.Contains(url, domain) { | ||||
| 			return icon | ||||
| 		} | ||||
| 	} | ||||
| 	return DEFAULT_REMOTE_ICON | ||||
| } | ||||
|  | ||||
| func IconForStash(stash *models.StashEntry) string { | ||||
| 	return STASH_ICON | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user