1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-10-27 10:43:20 +00:00

improve list interface

This commit is contained in:
nishiki 2016-07-10 11:01:11 +02:00
parent 712ac9d998
commit 55342597ac

View file

@ -160,7 +160,12 @@ class Cli
result.each do |item| result.each do |item|
if group != item.group if group != item.group
group = item.group group = item.group
puts "#{I18n.t('display.group')}: #{group}".yellow
if group.empty?
puts I18n.t('display.no_group').yellow
else
puts "\n#{group}".yellow
end
end end
print " |_ ".yellow print " |_ ".yellow
@ -171,6 +176,8 @@ class Cli
i += 1 i += 1
end end
print "\n"
choice = ask(I18n.t('form.select')).to_i choice = ask(I18n.t('form.select')).to_i
if choice >= 1 and choice < i if choice >= 1 and choice < i