1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Allow users to choose color

Change boolean in config yaml to 'successBallColor' which allows users to choose their own if they wish
This commit is contained in:
Jack Morris 2019-04-15 17:03:49 +01:00 committed by GitHub
parent db7e4b960c
commit 58228834fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,9 +120,10 @@ func (widget *Widget) rowColor(idx int) string {
func (widget *Widget) jobColor(job *Job) string {
switch job.Color {
case "blue":
// Override color if greenBalls boolean param provided in config
if wtf.Config.UString("wtf.mods.jenkins.greenBalls") == "true" {
return "green"
// Override color if successBallColor boolean param provided in config
ballColor := wtf.Config.UString("wtf.mods.jenkins.successBallColor", "blue")
if ballColor != "blue" {
return ballColor
} else {
return "blue"
}