1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-02-20 01:50:04 +00:00

feat: add copy url

This commit is contained in:
Adrien Waksberg 2017-05-21 18:00:43 +02:00
parent 5f29f7b6e8
commit ab459f954d
3 changed files with 13 additions and 0 deletions

View file

@ -111,8 +111,10 @@ en:
login: "The login has been copied in clipboard."
password: "The password has been copied in clipboard for 30s!"
otp: "The OTP code has been copied for %{time}s!"
url: "The URL has been copied in clipboard."
help:
name: "Help"
url: "Press <u> to copy URL"
login: "Press <l> to copy the login"
password: "Press <p> to copy the password"
otp_code: "Press <o> to copy the otp code"

View file

@ -111,8 +111,10 @@ fr:
login: "L'identifiant a été copié dans le presse papier"
password: "Le mot de passe a été copié dans le presse papier pour 30s!"
otp: "Le code OTP a été copié dans le presse papier il est valable %{time}s!"
url: "L'URL a été copié dans le presse papier"
help:
name: "Aide"
url: "Pressez <u> pour copier l'URL"
login: "Pressez <l> pour copier l'identifiant"
password: "Pressez <p> pour copier le mot de passe"
otp_code: "Pressez <o> pour copier le code OTP"

View file

@ -300,6 +300,14 @@ module MPW
when 'q', 'quit'
break
when 'u', 'url'
if clipboard
Clipboard.copy(item.url)
puts I18n.t('form.clipboard.url').green
else
puts item.url
end
when 'l', 'login'
if clipboard
Clipboard.copy(item.user)
@ -332,6 +340,7 @@ module MPW
else
puts "----- #{I18n.t('form.clipboard.help.name')} -----".cyan
puts I18n.t('form.clipboard.help.url')
puts I18n.t('form.clipboard.help.login')
puts I18n.t('form.clipboard.help.password')
puts I18n.t('form.clipboard.help.otp_code')