Skip to content

Commit f287d1b

Browse files
committed
fix input box length
1 parent f636404 commit f287d1b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

chgpass.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ func showChangePasswordWindow() {
1616
form.SetTitle(windowTitle)
1717
form.SetBorder(true)
1818
passwordField := tview.NewInputField().SetLabel("Password").
19-
SetFieldWidth(64).
19+
SetFieldWidth(0).
2020
SetMaskCharacter('*')
2121

2222
passwordFieldConfirm := tview.NewInputField().SetLabel("Password Confirm").
23-
SetFieldWidth(64).
23+
SetFieldWidth(0).
2424
SetMaskCharacter('*')
2525

2626
form.AddButton("OK", func() {

keygen.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ func showKeyGenPasswordPrompt(newkey *MasterKey, parent string, path string) {
3434
form.SetTitle(windowTitle)
3535
form.SetBorder(true)
3636
passwordField := tview.NewInputField().SetLabel("Password").
37-
SetFieldWidth(64).
37+
SetFieldWidth(0).
3838
SetMaskCharacter('*')
3939

4040
passwordFieldConfirm := tview.NewInputField().SetLabel("Password Confirm").
41-
SetFieldWidth(64).
41+
SetFieldWidth(0).
4242
SetMaskCharacter('*')
4343

4444
form.AddFormItem(passwordField)
@@ -199,7 +199,7 @@ func showKeySaveWindow(newkey *MasterKey) {
199199
inputField := tview.NewInputField().
200200
SetLabel("Save To:").
201201
SetText(filepath.Join(path, ".safebox.key")).
202-
SetFieldWidth(64)
202+
SetFieldWidth(0)
203203
form.AddFormItem(inputField)
204204
form.AddButton("Save", func() {
205205
// check file existence

loadkey.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func showLoadPassword(parent string, path string) {
2020
form.SetTitle(windowTitle)
2121
form.SetBorder(true)
2222
passwordField := tview.NewInputField().SetLabel("Password").
23-
SetFieldWidth(64).
23+
SetFieldWidth(0).
2424
SetMaskCharacter('*')
2525

2626
passChangedFunc := func(text string) {
@@ -68,7 +68,7 @@ func showLoadKeyWindow() {
6868
inputField := tview.NewInputField().
6969
SetLabel("Path: ").
7070
SetText(filepath.Join(path, ".safebox.key")).
71-
SetFieldWidth(64)
71+
SetFieldWidth(0)
7272

7373
form.AddFormItem(inputField)
7474
form.AddButton("Load", func() {

0 commit comments

Comments
 (0)