Update Picocrypt.go

This commit is contained in:
Evan Su 2021-08-09 20:58:47 -04:00 committed by GitHub
parent 6d00d4c43f
commit 8e476f04e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 9 deletions

View File

@ -297,15 +297,19 @@ func startUI(){
// Prompt for password
giu.Row(
giu.Label("Password:"),
giu.Custom(func(){
if mode!="decrypt"{
giu.SmallButton("Generate").OnClick(func(){
tmp := genPassword()
password = tmp
cPassword = tmp
passwordStrength = zxcvbn.PasswordStrength(password,nil).Score
giu.Update()
}),
}).Build()
giu.SmallButton("Copy").OnClick(func(){
clipboard.WriteAll(password)
}).Build()
}
}),
giu.Dummy(-200,0),
giu.Label(keyfilePrompt),