1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Re-add command line help

This commit is contained in:
Sean Smith
2019-05-11 19:40:24 -04:00
parent 7f3daaac59
commit cd35d1e0a3
22 changed files with 108 additions and 6 deletions

View File

@@ -64,6 +64,10 @@ func (widget *Widget) Render() {
widget.Redraw(widget.CommonSettings.Title, content, false)
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) contentFrom(triggeredMonitors []datadog.Monitor) string {

View File

@@ -90,6 +90,10 @@ func (widget *Widget) Refresh() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) nextProject() {

View File

@@ -85,6 +85,10 @@ func (widget *Widget) Refresh() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) addCheckoutButton(form *tview.Form, fctn func()) {

View File

@@ -67,6 +67,10 @@ func (widget *Widget) Prev() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) buildRepoCollection(repoData map[string]interface{}) []*GithubRepo {

View File

@@ -73,6 +73,10 @@ func (widget *Widget) Prev() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) buildProjectCollection(projectData map[string]interface{}) []*GitlabProject {

View File

@@ -64,6 +64,10 @@ func (widget *Widget) Refresh() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) display() {

View File

@@ -79,6 +79,10 @@ func (widget *Widget) Refresh() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) addCheckoutButton(form *tview.Form, fctn func()) {

View File

@@ -47,6 +47,10 @@ func (widget *Widget) Refresh() {
widget.Redraw(widget.CommonSettings.Title, widget.nbascore(), false)
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
func (widget *Widget) nbascore() string {
cur := time.Now().AddDate(0, 0, offset) // Go back/forward offset days
curString := cur.Format("20060102") // Need 20060102 format to feed to api

View File

@@ -55,6 +55,10 @@ func (w *Widget) Refresh() {
w.render()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
func (w *Widget) render() {
err := w.refreshSpotifyInfos()
var content string

View File

@@ -165,6 +165,10 @@ func (w *Widget) Refresh() {
}
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
func (w *Widget) createOutput() string {
output := wtf.CenterText(fmt.Sprintf("[green]Now %v [white]\n", w.Info.Status), w.Width())
output += wtf.CenterText(fmt.Sprintf("[green]Title:[white] %v\n", w.Info.Title), w.Width())

View File

@@ -63,6 +63,10 @@ func (widget *Widget) Refresh() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) display() {

View File

@@ -65,6 +65,10 @@ func (widget *Widget) SetList(list checklist.Checklist) {
widget.list = list
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
// edit opens a modal dialog that permits editing the text of the currently-selected item

View File

@@ -77,6 +77,10 @@ func (w *Widget) Refresh() {
w.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Keyboard Movement -------------------- */
// Down selects the next item in the list

View File

@@ -54,6 +54,10 @@ func (widget *Widget) Refresh() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) display() {

View File

@@ -87,6 +87,10 @@ func (widget *Widget) Prev() {
widget.display()
}
func (widget *Widget) HelpText() string {
return widget.KeyboardWidget.HelpText()
}
/* -------------------- Unexported Functions -------------------- */
func (widget *Widget) apiKeyValid() bool {