mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
WTF-730 Fix missing color key config error (#738)
* WTF-730 Fix missing color key config error Signed-off-by: Chris Cummer <chriscummer@me.com> * WTF-730 Add Subheading color formatting to modules Users can now set a `subheading` color in their config to change the color of subheadings in widget display. Defaults to `red`. Signed-off-by: Chris Cummer <chriscummer@me.com> * WTF-730 Fix oustanding color issues Clean up missing color config changes not addressed in earlier commits. Signed-off-by: Chris Cummer <chriscummer@me.com> * Remove unused dependency Signed-off-by: Chris Cummer <chriscummer@me.com> * WTF-730 Base cleanup Signed-off-by: Chris Cummer <chriscummer@me.com> * WTF-730 Fix a few bugs related to color config changes Signed-off-by: Chris Cummer <chriscummer@me.com> * WTF-730 Fix issues with PagerDuty subheading display Signed-off-by: Chris Cummer <chriscummer@me.com> * WTF-730 Fix bug with Todo list colour rendering Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
@@ -34,14 +34,14 @@ func (widget *Widget) content() (string, string, bool) {
|
||||
|
||||
_, _, width, _ := widget.View.GetRect()
|
||||
str := widget.settings.common.SigilStr(len(widget.GithubRepos), widget.Idx, width) + "\n"
|
||||
str += " [red]Stats[white]\n"
|
||||
str += fmt.Sprintf(" [%s]Stats[white]\n", widget.settings.common.Colors.Subheading)
|
||||
str += widget.displayStats(repo)
|
||||
str += "\n [red]Open Review Requests[white]\n"
|
||||
str += fmt.Sprintf("\n [%s]Open Review Requests[white]\n", widget.settings.common.Colors.Subheading)
|
||||
str += widget.displayMyReviewRequests(repo, username)
|
||||
str += "\n [red]My Pull Requests[white]\n"
|
||||
str += fmt.Sprintf("\n [%s]My Pull Requests[white]\n", widget.settings.common.Colors.Subheading)
|
||||
str += widget.displayMyPullRequests(repo, username)
|
||||
for _, customQuery := range widget.settings.customQueries {
|
||||
str += fmt.Sprintf("\n [red]%s[white]\n", customQuery.title)
|
||||
str += fmt.Sprintf("\n [%s]%s[white]\n", widget.settings.common.Colors.Subheading, customQuery.title)
|
||||
str += widget.displayCustomQuery(repo, customQuery.filter, customQuery.perPage)
|
||||
}
|
||||
|
||||
@@ -127,7 +127,12 @@ func (widget *Widget) displayStats(repo *GithubRepo) string {
|
||||
}
|
||||
|
||||
func (widget *Widget) title(repo *GithubRepo) string {
|
||||
return fmt.Sprintf("[green]%s - %s[white]", repo.Owner, repo.Name)
|
||||
return fmt.Sprintf(
|
||||
"[%s]%s - %s[white]",
|
||||
widget.settings.common.Colors.TextTheme.Title,
|
||||
repo.Owner,
|
||||
repo.Name,
|
||||
)
|
||||
}
|
||||
|
||||
var mergeIcons = map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user