mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Move WidgetMaker functionality into /app
This commit is contained in:
parent
59429b097d
commit
2ba50f2a73
@ -1,4 +1,4 @@
|
||||
package maker
|
||||
package app
|
||||
|
||||
import (
|
||||
"github.com/olebedev/config"
|
@ -9,7 +9,6 @@ import (
|
||||
"github.com/radovskyb/watcher"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/maker"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
@ -39,7 +38,7 @@ func NewWtfApp(app *tview.Application, config *config.Config, configFilePath str
|
||||
}
|
||||
|
||||
wtfApp.app.SetInputCapture(wtfApp.keyboardIntercept)
|
||||
wtfApp.widgets = maker.MakeWidgets(wtfApp.app, wtfApp.pages, wtfApp.config)
|
||||
wtfApp.widgets = MakeWidgets(wtfApp.app, wtfApp.pages, wtfApp.config)
|
||||
wtfApp.display = NewDisplay(wtfApp.widgets, wtfApp.config)
|
||||
wtfApp.focusTracker = NewFocusTracker(wtfApp.app, wtfApp.widgets, wtfApp.config)
|
||||
wtfApp.validator = NewModuleValidator()
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/maker"
|
||||
"github.com/wtfutil/wtf/app"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
@ -18,7 +18,7 @@ func Display(moduleName string, config *config.Config) {
|
||||
}
|
||||
|
||||
func helpFor(moduleName string, config *config.Config) string {
|
||||
widget := maker.MakeWidget(nil, nil, moduleName, config)
|
||||
widget := app.MakeWidget(nil, nil, moduleName, config)
|
||||
|
||||
result := ""
|
||||
result += utils.StripColorTags(widget.HelpText())
|
||||
|
Loading…
x
Reference in New Issue
Block a user