Add password generation UI profile workflow
This commit is contained in:
+3
-4
@@ -313,10 +313,9 @@ func (u *ui) copySelectedFieldAction(target clipboard.Target) error {
|
||||
}
|
||||
|
||||
func (u *ui) generatePasswordAction() error {
|
||||
profiles := passwords.DefaultProfiles()
|
||||
profile, ok := profiles[strings.TrimSpace(u.passwordProfile.Text())]
|
||||
if !ok {
|
||||
return fmt.Errorf("unknown password profile")
|
||||
profile, err := passwords.LookupDefaultProfile(u.passwordProfile.Text())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
password, err := passwords.Generate(profile)
|
||||
|
||||
Reference in New Issue
Block a user