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:
parent
db7e4b960c
commit
58228834fc
@ -120,9 +120,10 @@ func (widget *Widget) rowColor(idx int) string {
|
|||||||
func (widget *Widget) jobColor(job *Job) string {
|
func (widget *Widget) jobColor(job *Job) string {
|
||||||
switch job.Color {
|
switch job.Color {
|
||||||
case "blue":
|
case "blue":
|
||||||
// Override color if greenBalls boolean param provided in config
|
// Override color if successBallColor boolean param provided in config
|
||||||
if wtf.Config.UString("wtf.mods.jenkins.greenBalls") == "true" {
|
ballColor := wtf.Config.UString("wtf.mods.jenkins.successBallColor", "blue")
|
||||||
return "green"
|
if ballColor != "blue" {
|
||||||
|
return ballColor
|
||||||
} else {
|
} else {
|
||||||
return "blue"
|
return "blue"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user