mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-21 10:20:05 +00:00
remove old function display
This commit is contained in:
parent
73312b933f
commit
2e32b223b0
1 changed files with 0 additions and 38 deletions
|
@ -247,44 +247,6 @@ class Cli
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Display an item in the default format
|
|
||||||
# @args: item -> an array with the item information
|
|
||||||
def display_item(item)
|
|
||||||
puts '--------------------'.cyan
|
|
||||||
print 'Id: '.cyan
|
|
||||||
puts item.id
|
|
||||||
print "#{I18n.t('display.name')}: ".cyan
|
|
||||||
puts item.name
|
|
||||||
print "#{I18n.t('display.group')}: ".cyan
|
|
||||||
puts item.group
|
|
||||||
print "#{I18n.t('display.server')}: ".cyan
|
|
||||||
puts item.host
|
|
||||||
print "#{I18n.t('display.protocol')}: ".cyan
|
|
||||||
puts item.protocol
|
|
||||||
print "#{I18n.t('display.login')}: ".cyan
|
|
||||||
puts item.user
|
|
||||||
|
|
||||||
if @clipboard
|
|
||||||
print "#{I18n.t('display.password')}: ".cyan
|
|
||||||
puts '***********'
|
|
||||||
else
|
|
||||||
print "#{I18n.t('display.password')}: ".cyan
|
|
||||||
puts @mpw.get_password(item.id)
|
|
||||||
|
|
||||||
if @mpw.get_otp_code(item.id) > 0
|
|
||||||
print "#{I18n.t('display.otp_code')}: ".cyan
|
|
||||||
puts "#{@mpw.get_otp_code(item.id)} (#{@mpw.get_otp_remaining_time}s)"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
print "#{I18n.t('display.port')}: ".cyan
|
|
||||||
puts item.port
|
|
||||||
print "#{I18n.t('display.comment')}: ".cyan
|
|
||||||
puts item.comment
|
|
||||||
|
|
||||||
clipboard(item) if @clipboard
|
|
||||||
end
|
|
||||||
|
|
||||||
# Copy in clipboard the login and password
|
# Copy in clipboard the login and password
|
||||||
# @args: item -> the item
|
# @args: item -> the item
|
||||||
# clipboard -> enable clipboard
|
# clipboard -> enable clipboard
|
||||||
|
|
Loading…
Add table
Reference in a new issue