mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
Add search option to menu
This commit is contained in:
20
src/main.py
20
src/main.py
@@ -615,10 +615,11 @@ def display_menu(
|
||||
Select an option:
|
||||
1. Add Entry
|
||||
2. Retrieve Entry
|
||||
3. Modify an Existing Entry
|
||||
4. 2FA Codes
|
||||
5. Settings
|
||||
6. Exit
|
||||
3. Search Entries
|
||||
4. Modify an Existing Entry
|
||||
5. 2FA Codes
|
||||
6. Settings
|
||||
7. Exit
|
||||
"""
|
||||
display_fn = getattr(password_manager, "display_stats", None)
|
||||
if callable(display_fn):
|
||||
@@ -643,7 +644,7 @@ def display_menu(
|
||||
print(colored(menu, "cyan"))
|
||||
try:
|
||||
choice = timed_input(
|
||||
"Enter your choice (1-6): ", inactivity_timeout
|
||||
"Enter your choice (1-7): ", inactivity_timeout
|
||||
).strip()
|
||||
except TimeoutError:
|
||||
print(colored("Session timed out. Vault locked.", "yellow"))
|
||||
@@ -654,7 +655,7 @@ def display_menu(
|
||||
if not choice:
|
||||
print(
|
||||
colored(
|
||||
"No input detected. Please enter a number between 1 and 6.",
|
||||
"No input detected. Please enter a number between 1 and 7.",
|
||||
"yellow",
|
||||
)
|
||||
)
|
||||
@@ -682,14 +683,17 @@ def display_menu(
|
||||
password_manager.handle_retrieve_entry()
|
||||
elif choice == "3":
|
||||
password_manager.update_activity()
|
||||
password_manager.handle_modify_entry()
|
||||
password_manager.handle_search_entries()
|
||||
elif choice == "4":
|
||||
password_manager.update_activity()
|
||||
password_manager.handle_display_totp_codes()
|
||||
password_manager.handle_modify_entry()
|
||||
elif choice == "5":
|
||||
password_manager.update_activity()
|
||||
handle_settings(password_manager)
|
||||
elif choice == "6":
|
||||
password_manager.update_activity()
|
||||
password_manager.handle_display_totp_codes()
|
||||
elif choice == "7":
|
||||
logging.info("Exiting the program.")
|
||||
print(colored("Exiting the program.", "green"))
|
||||
password_manager.nostr_client.close_client_pool()
|
||||
|
Reference in New Issue
Block a user