mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Constantize the defaultFocus value for each module
This commit is contained in:
@@ -7,7 +7,10 @@ import (
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
)
|
||||
|
||||
const defaultTitle = "azuredevops"
|
||||
const (
|
||||
defaultFocus = false
|
||||
defaultTitle = "azuredevops"
|
||||
)
|
||||
|
||||
// Settings defines the configuration options for this module
|
||||
type Settings struct {
|
||||
@@ -23,7 +26,7 @@ type Settings struct {
|
||||
// NewSettingsFromYAML creates and returns an instance of Settings with configuration options populated
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
settings := Settings{
|
||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, ymlConfig, globalConfig),
|
||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocus, ymlConfig, globalConfig),
|
||||
|
||||
labelColor: ymlConfig.UString("labelColor", "white"),
|
||||
apiToken: ymlConfig.UString("apiToken", os.Getenv("WTF_AZURE DEVOPS_API_TOKEN")),
|
||||
|
||||
@@ -21,7 +21,7 @@ type Widget struct {
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: view.NewTextWidget(app, settings.common, false),
|
||||
TextWidget: view.NewTextWidget(app, settings.common),
|
||||
settings: settings,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user