Remove use-copy-paste option from autotype
This commit is contained in:
parent
04d2357f3c
commit
5a40f237a7
@ -49,7 +49,7 @@ func ListLogins(client client.Client) ([]messages.DecryptedLoginCipher, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func Run(layout string, useCopyPaste bool, client client.Client) {
|
||||
func Run(layout string, client client.Client) {
|
||||
logins, err := ListLogins(client)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -70,15 +70,7 @@ func Run(layout string, useCopyPaste bool, client client.Client) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if useCopyPaste {
|
||||
clipboard.WriteAll(string(login.Username))
|
||||
autotype.Paste(layout)
|
||||
autotype.TypeString("\t", layout)
|
||||
clipboard.WriteAll(login.Password)
|
||||
autotype.Paste(layout)
|
||||
} else {
|
||||
autotype.TypeString(string(login.Username)+"\t"+string(login.Password), layout)
|
||||
}
|
||||
|
||||
clipboard.WriteAll(login.TwoFactorCode)
|
||||
c <- true
|
||||
|
@ -68,8 +68,3 @@ func TypeString(textToType string, layout string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Paste(layout string) error {
|
||||
fmt.Println("Not implemented")
|
||||
return nil
|
||||
}
|
||||
|
@ -7,7 +7,3 @@ import "github.com/quexten/goldwarden/autofill/autotype/uinput"
|
||||
func TypeString(text string, layout string) error {
|
||||
return uinput.TypeString(text, layout)
|
||||
}
|
||||
|
||||
func Paste(layout string) error {
|
||||
return uinput.Paste(layout)
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ var autofillCmd = &cobra.Command{
|
||||
Long: `Autofill credentials`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
layout := cmd.Flag("layout").Value.String()
|
||||
useCopyPaste, _ := cmd.Flags().GetBool("use-copy-paste")
|
||||
autofill.Run(layout, useCopyPaste, commandClient)
|
||||
autofill.Run(layout, commandClient)
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user