Added a few more colors
This commit is contained in:
parent
544a579649
commit
649314bb4d
13
main.go
13
main.go
@ -101,8 +101,15 @@ func main() {
|
|||||||
|
|
||||||
case "defaults":
|
case "defaults":
|
||||||
// Show Defaults
|
// Show Defaults
|
||||||
for i := range state.account.ActiveCalendars {
|
for _, v := range state.account.ActiveCalendars {
|
||||||
fmt.Println(state.account.ActiveCalendars[i])
|
if c, err := state.account.GetCalendarById(v); err == nil {
|
||||||
|
var colDef *calendar.ColorDefinition
|
||||||
|
if colDef, err = state.account.GetCalendarColor(c.Id); err != nil {
|
||||||
|
fmt.Println(err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
fmt.Println(CalColToAnsi(*colDef).Sprint(" ") + " " + colDef.Background + " " + c.Summary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case "delete":
|
case "delete":
|
||||||
@ -451,7 +458,7 @@ func CalColToAnsi(col calendar.ColorDefinition) *color.Color {
|
|||||||
return colCyan, nil
|
return colCyan, nil
|
||||||
case "#f83a22", "#ac725e":
|
case "#f83a22", "#ac725e":
|
||||||
return colRed, nil
|
return colRed, nil
|
||||||
case "#fad165", "#ff7537", "#e6c800":
|
case "#fad165", "#ff7537", "#e6c800", "#fbe983", "#ffad46":
|
||||||
return colYellow, nil
|
return colYellow, nil
|
||||||
}
|
}
|
||||||
return 0, errors.New("Not found")
|
return 0, errors.New("Not found")
|
||||||
|
Loading…
Reference in New Issue
Block a user