mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
WTF-400 Bittrex extracted to new config format
This commit is contained in:
@@ -6,17 +6,17 @@ import (
|
||||
)
|
||||
|
||||
type Settings struct {
|
||||
Common *cfg.Common
|
||||
common *cfg.Common
|
||||
|
||||
FilePath string
|
||||
filePath string
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(ymlConfig *config.Config) *Settings {
|
||||
localConfig, _ := ymlConfig.Get("wtf.mods.todo")
|
||||
|
||||
settings := Settings{
|
||||
Common: cfg.NewCommonSettingsFromYAML(ymlConfig),
|
||||
FilePath: localConfig.UString("filename"),
|
||||
common: cfg.NewCommonSettingsFromYAML(ymlConfig),
|
||||
filePath: localConfig.UString("filename"),
|
||||
}
|
||||
|
||||
return &settings
|
||||
|
||||
@@ -53,7 +53,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *
|
||||
|
||||
app: app,
|
||||
settings: settings,
|
||||
filePath: settings.FilePath,
|
||||
filePath: settings.filePath,
|
||||
list: checklist.NewChecklist(),
|
||||
pages: pages,
|
||||
}
|
||||
@@ -257,8 +257,8 @@ func (widget *Widget) modalFocus(form *tview.Form) {
|
||||
}
|
||||
|
||||
func (widget *Widget) modalForm(lbl, text string) *tview.Form {
|
||||
form := tview.NewForm().SetFieldBackgroundColor(wtf.ColorFor(widget.settings.Common.Colors.Background))
|
||||
form.SetButtonsAlign(tview.AlignCenter).SetButtonTextColor(wtf.ColorFor(widget.settings.Common.Colors.Text))
|
||||
form := tview.NewForm().SetFieldBackgroundColor(wtf.ColorFor(widget.settings.common.Colors.Background))
|
||||
form.SetButtonsAlign(tview.AlignCenter).SetButtonTextColor(wtf.ColorFor(widget.settings.common.Colors.Text))
|
||||
|
||||
form.AddInputField(lbl, text, 60, nil, nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user