Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Tokeninput wasn't masked in token login.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bios-Marcel committed Nov 3, 2019
1 parent 0462fb2 commit 97a3b31
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions commands/commandimpls/tfa.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package commandimpls
5 changes: 5 additions & 0 deletions tools/bugs/qrcode/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func main() {
$END$
}
1 change: 1 addition & 0 deletions ui/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func NewLogin(app *tview.Application, configDir string) *Login {

configureInputComponent(login.tokenInput)
login.tokenInput.SetTitle("Token")
login.tokenInput.SetMaskCharacter(login.tokenInputMaskRune)
configureInputComponent(login.usernameInput)
login.usernameInput.SetTitle("E-Mail")
configureInputComponent(login.passwordInput)
Expand Down
12 changes: 12 additions & 0 deletions ui/tviewutil/layout.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tviewutil

import "github.com/Bios-Marcel/tview"

func CreateCenteredComponent(component tview.Primitive, width int) tview.Primitive {
padding := tview.NewFlex().SetDirection(tview.FlexColumn)
padding.AddItem(tview.NewBox(), 0, 1, false)
padding.AddItem(component, width, 0, false)
padding.AddItem(tview.NewBox(), 0, 1, false)

return padding
}

0 comments on commit 97a3b31

Please sign in to comment.