This commit is contained in:
Alexander Popov 2022-04-08 17:49:26 +03:00
parent d72acba22c
commit 70153a6e42
Signed by: iiiypuk
GPG Key ID: 3F76816AEE08F908
2 changed files with 28 additions and 18 deletions

View File

@ -7,15 +7,15 @@
- ♻️ - Edited - ♻️ - Edited
## 0.2.2 - [08/04/2022] ## 0.2.2 - [08/04/2022]
- - Added password file check permissions - - Added check permissions for password file
- - Added title by start program - - Added title by start program
- - Added clear terminal by new search - - Added terminal cleaning functionality
- - Added by start&close program clear terminal - - Added help tips to user prompt
- - Added help tooltip to prompt - - Added emoji for output
- - Added emoji to output - - Added colors for help sections
- ✔️ - Fixed BYE emoji color - ✔️ - Fixed bug on bye emoji color
- ♻️ - Edited URL color & style output - ♻️ - Edited color & style for data output
- 🐛 - Before label emoji not insert space symbol (temponary change emoji) - 🐛 - After emoji label not view space symbol (emoji temporary changed)
## 0.2.1 - [14/03/2022] ## 0.2.1 - [14/03/2022]
- - prompt '>' set color green - - prompt '>' set color green

View File

@ -107,25 +107,31 @@ while loop
password_string = gets password_string = gets
# if ':q' to close program
if password_string.to_s == ":q" if password_string.to_s == ":q"
# if ':q' to close program
system "clear" system "clear"
puts "Bye! 👋" puts "Bye! 👋"
exit(0) exit(0)
# if puts empty, retry prompt
elsif password_string.to_s.size == 0 elsif password_string.to_s.size == 0
# if puts empty, retry prompt
puts puts
# if ':h' to view help
elsif password_string.to_s == ":h" elsif password_string.to_s == ":h"
puts "Help:\n-----" # if ':h' to view help
puts ":s - Return stats" system "clear"
# if ':s' to view Statistics
puts "Help\n----".colorize(:yellow).mode(:bold)
print ":s".colorize(:red).mode(:bold)
puts " - Return stats"
elsif password_string.to_s == ":s" elsif password_string.to_s == ":s"
puts "Statistics:\n----------" # if ':s' to view Statistics
print "Elements: ".colorize(:yellow) system "clear"
puts "Statistics\n----------".colorize(:yellow).mode(:bold)
print "All elements: ".colorize(:yellow).mode(:bold)
puts passwords_array.size puts passwords_array.size
print "Outdated: ".colorize(:red) print "Passwords outdated: ".colorize(:red).mode(:bold)
outdated_count = 0 outdated_count = 0
current_time = Time.local.to_unix current_time = Time.local.to_unix
a = [] of String a = [] of String
@ -137,8 +143,8 @@ while loop
end end
puts outdated_count puts outdated_count
# list search password
else else
# list search password
system "clear" system "clear"
passwords_array.each do |item| passwords_array.each do |item|
@ -150,19 +156,23 @@ while loop
print "📧 " print "📧 "
puts item.email.colorize(:red) puts item.email.colorize(:red)
end end
if !item.login.blank? if !item.login.blank?
# print "🏷️ " # Bug # print "🏷️ " # Bug
print "🗿 " print "🗿 "
puts item.login.colorize(:yellow) puts item.login.colorize(:yellow)
end end
if !item.password.blank? if !item.password.blank?
print "🔐 " print "🔐 "
puts item.password.colorize(:red).back(:red) puts item.password.colorize(:red).back(:red)
end end
if !item.desc.blank? if !item.desc.blank?
print "📄 " print "📄 "
puts item.desc.colorize(:cyan) puts item.desc.colorize(:cyan)
end end
if !item.profile_url.blank? if !item.profile_url.blank?
print "👦 " print "👦 "
puts item.profile_url.colorize(:green) puts item.profile_url.colorize(:green)