Skip to content
Snippets Groups Projects

V.0.1.0 Codename Threadbare

Closed Ghost User requested to merge v.0.1.0-codename-threadbare into master
3 files
+ 52
9
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -35,7 +35,7 @@ func (cv *CommandListView) GetContent() tview.Primitive {
func (cv *CommandListView) GetCommands(app *app.App, rv *ResultAndInputView,
conn *grpc.ClientConn) {
//TODO: create own command in grpc -> commands
cv.commandsList.AddItem("AddPND", "closes the application", '!', func() {
cv.commandsList.AddItem("AddPND", "closes the application", 'a', func() {
rv.ChangeContentView("addPND")
app.SetFocus(rv.GetContent())
})
@@ -43,13 +43,17 @@ func (cv *CommandListView) GetCommands(app *app.App, rv *ResultAndInputView,
for i, command := range commands.CommandList {
f := command.Function
cv.commandsList.
AddItem(command.Name, command.Description, rune('a'+i), func() {
AddItem(command.Name, command.Description, rune('b'+i), func() {
r := f(conn)
rv.SetContent(r)
rv.ChangeContentView("result")
})
}
cv.commandsList.AddItem("Show Log", "shows the log of goSDN", 'l', func() {
rv.ChangeContentView("log")
})
cv.commandsList.AddItem("quit", "closes the application", 'q', func() {
app.Stop()
})
Loading