Skip to content

Commit

Permalink
fix input box length
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Oct 28, 2024
1 parent f636404 commit f287d1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions chgpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ func showChangePasswordWindow() {
form.SetTitle(windowTitle)
form.SetBorder(true)
passwordField := tview.NewInputField().SetLabel("Password").
SetFieldWidth(64).
SetFieldWidth(0).
SetMaskCharacter('*')

passwordFieldConfirm := tview.NewInputField().SetLabel("Password Confirm").
SetFieldWidth(64).
SetFieldWidth(0).
SetMaskCharacter('*')

form.AddButton("OK", func() {
Expand Down
6 changes: 3 additions & 3 deletions keygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func showKeyGenPasswordPrompt(newkey *MasterKey, parent string, path string) {
form.SetTitle(windowTitle)
form.SetBorder(true)
passwordField := tview.NewInputField().SetLabel("Password").
SetFieldWidth(64).
SetFieldWidth(0).
SetMaskCharacter('*')

passwordFieldConfirm := tview.NewInputField().SetLabel("Password Confirm").
SetFieldWidth(64).
SetFieldWidth(0).
SetMaskCharacter('*')

form.AddFormItem(passwordField)
Expand Down Expand Up @@ -199,7 +199,7 @@ func showKeySaveWindow(newkey *MasterKey) {
inputField := tview.NewInputField().
SetLabel("Save To:").
SetText(filepath.Join(path, ".safebox.key")).
SetFieldWidth(64)
SetFieldWidth(0)
form.AddFormItem(inputField)
form.AddButton("Save", func() {
// check file existence
Expand Down
4 changes: 2 additions & 2 deletions loadkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func showLoadPassword(parent string, path string) {
form.SetTitle(windowTitle)
form.SetBorder(true)
passwordField := tview.NewInputField().SetLabel("Password").
SetFieldWidth(64).
SetFieldWidth(0).
SetMaskCharacter('*')

passChangedFunc := func(text string) {
Expand Down Expand Up @@ -68,7 +68,7 @@ func showLoadKeyWindow() {
inputField := tview.NewInputField().
SetLabel("Path: ").
SetText(filepath.Join(path, ".safebox.key")).
SetFieldWidth(64)
SetFieldWidth(0)

form.AddFormItem(inputField)
form.AddButton("Load", func() {
Expand Down

0 comments on commit f287d1b

Please sign in to comment.