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:
@@ -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 {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user