chore: qol update
This commit is contained in:
@@ -41,5 +41,6 @@ func verifyCred(username, password, targetName string) bool {
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
log.Println("Success!")
|
||||
return true
|
||||
}
|
||||
|
||||
10
src/draw.go
10
src/draw.go
@@ -100,6 +100,7 @@ func drawButtonRow(targetMode *int) *fyne.Container {
|
||||
func drawTargetSection(raspiNames []string, raspiTarget *string) *fyne.Container {
|
||||
actionText := widget.NewLabel("Select Target")
|
||||
|
||||
var verifyBtn *widget.Button
|
||||
// Left side for selection of target
|
||||
piSelection := widget.NewRadioGroup(raspiNames, func(selected string) {
|
||||
if len(selected) != 0 {
|
||||
@@ -108,6 +109,8 @@ func drawTargetSection(raspiNames []string, raspiTarget *string) *fyne.Container
|
||||
} else {
|
||||
log.Println("Deselected Target")
|
||||
}
|
||||
verifyBtn.Importance = widget.LowImportance
|
||||
refreshButtons(verifyBtn)
|
||||
})
|
||||
|
||||
// Right side authentication
|
||||
@@ -117,7 +120,7 @@ func drawTargetSection(raspiNames []string, raspiTarget *string) *fyne.Container
|
||||
userEntry := widget.NewEntry()
|
||||
userEntry.SetPlaceHolder("<your-username>")
|
||||
|
||||
passEntry := widget.NewEntry()
|
||||
passEntry := widget.NewPasswordEntry()
|
||||
passEntry.SetPlaceHolder("<your-password>")
|
||||
|
||||
expander := canvas.NewRectangle(color.Transparent)
|
||||
@@ -130,7 +133,7 @@ func drawTargetSection(raspiNames []string, raspiTarget *string) *fyne.Container
|
||||
)
|
||||
|
||||
divider := canvas.NewRectangle(color.Transparent)
|
||||
divider.SetMinSize(fyne.NewSize(300, 0))
|
||||
divider.SetMinSize(fyne.NewSize(250, 0))
|
||||
|
||||
selecCol := container.NewVBox(
|
||||
actionText,
|
||||
@@ -143,11 +146,10 @@ func drawTargetSection(raspiNames []string, raspiTarget *string) *fyne.Container
|
||||
targetAuth,
|
||||
)
|
||||
|
||||
var verifyBtn *widget.Button
|
||||
var credOK bool
|
||||
verifyBtn = widget.NewButton("Verify Credentials", func() {
|
||||
verifyBtn.Importance = widget.HighImportance
|
||||
refreshButtons(verifyBtn)
|
||||
refreshButtons(verifyBtn)
|
||||
|
||||
log.Println("Verifying credentials...")
|
||||
go func() {
|
||||
|
||||
@@ -22,9 +22,9 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
windowSize fyne.Size = fyne.NewSize(750, 700) // Default Window size
|
||||
windowSize fyne.Size = fyne.NewSize(750, 800) // Default Window size
|
||||
//dialogSize fyne.Size = fyne.NewSize(750, 700) // For some reason when we use windowSize for that, its still smaller, this is also smaller. But a better fit
|
||||
buttonSize fyne.Size = fyne.NewSize(200, 50) // Default button size
|
||||
buttonSize fyne.Size = fyne.NewSize(200, 50) // Default button size
|
||||
entrySize fyne.Size = fyne.NewSize(200, 40)
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ var (
|
||||
// 0 Raspberry Pi Name
|
||||
// 1 Raspberry Pi IP-Adress
|
||||
// 2 Raspberry Pi SSH-port
|
||||
raspiList [3][3]string = [3][3]string{
|
||||
raspiList [][]string = [][]string{
|
||||
{"Kantine Pi", "172.16.64.228", "22"},
|
||||
{"Productie Pi", "172.16.64.229", "22"},
|
||||
{"Sales Pi", "", ""},
|
||||
{"MyTempHost", "192.168.178.20", "22"},
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user