update app

This commit is contained in:
durbok
2024-12-28 15:54:49 +01:00
parent 352e98606f
commit b6bbf30bd0
7 changed files with 165 additions and 0 deletions

27
tui/interface.go Normal file
View File

@@ -0,0 +1,27 @@
package tui
import (
"github.com/rivo/tview"
)
func StartTUI() {
app := tview.NewApplication()
form := tview.NewForm().
AddInputField("User", "", 20, nil, nil).
AddInputField("Host", "", 20, nil, nil).
AddInputField("Port", "22", 5, nil, nil).
AddPasswordField("Password", "", 20, '*', nil).
AddInputField("Private Key", "", 20, nil, nil).
AddButton("Connect", func() {
// Handle SSH connection logic
}).
AddButton("Quit", func() {
app.Stop()
})
form.SetBorder(true).SetTitle("SSH Connection").SetTitleAlign(tview.AlignLeft)
if err := app.SetRoot(form, true).Run(); err != nil {
panic(err)
}
}