-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from hatsu38/feature/add-command-comment
Add command comment
- Loading branch information
Showing
8 changed files
with
327 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package gui | ||
|
||
import ( | ||
"github.com/gdamore/tcell/v2" | ||
"github.com/rivo/tview" | ||
) | ||
|
||
type httpTestView struct { | ||
*tview.TextView | ||
} | ||
|
||
func newHTTPTextView() *httpTestView { | ||
textView := &httpTestView{ | ||
tview.NewTextView(), | ||
} | ||
textView.SetTitle(" HTTP ") | ||
textView.SetBorder(true) | ||
textView.SetScrollable(true) | ||
textView.SetText("GET") | ||
textView.SetTextColor(tcell.ColorGreen) | ||
textView.SetToggleHighlights(true) | ||
textView.SetTextAlign(tview.AlignCenter) | ||
|
||
return textView | ||
} | ||
|
||
func (t *httpTestView) setFunc(g *Gui) { | ||
t.SetDoneFunc(func(key tcell.Key) { | ||
switch key { | ||
case tcell.KeyEnter: | ||
g.NewHTTPListModal() | ||
case tcell.KeyTab: | ||
g.ToFocus() | ||
} | ||
}) | ||
} |
Oops, something went wrong.