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

no show otp code field if otp code is nil

This commit is contained in:
nishiki 2016-08-03 21:37:49 +02:00
parent 1104706692
commit fbc291c177

View file

@ -212,8 +212,11 @@ class Cli
else
print "#{I18n.t('display.password')}: ".cyan
puts @mpw.get_password(item.id)
print "#{I18n.t('display.otp_code')}: ".cyan
puts "#{@mpw.get_otp_code(item.id)} (#{@mpw.get_otp_remaining_time}s)"
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