mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 15:58:48 +00:00
Move back option to end of settings menu
This commit is contained in:
@@ -584,8 +584,8 @@ def handle_settings(password_manager: PasswordManager) -> None:
|
|||||||
print("9. Set additional backup location")
|
print("9. Set additional backup location")
|
||||||
print("10. Set inactivity timeout")
|
print("10. Set inactivity timeout")
|
||||||
print("11. Lock Vault")
|
print("11. Lock Vault")
|
||||||
print("12. Back")
|
print("12. Stats")
|
||||||
print("13. Stats")
|
print("13. Back")
|
||||||
choice = input("Select an option: ").strip()
|
choice = input("Select an option: ").strip()
|
||||||
if choice == "1":
|
if choice == "1":
|
||||||
handle_profiles_menu(password_manager)
|
handle_profiles_menu(password_manager)
|
||||||
@@ -614,9 +614,9 @@ def handle_settings(password_manager: PasswordManager) -> None:
|
|||||||
print(colored("Vault locked. Please re-enter your password.", "yellow"))
|
print(colored("Vault locked. Please re-enter your password.", "yellow"))
|
||||||
password_manager.unlock_vault()
|
password_manager.unlock_vault()
|
||||||
elif choice == "12":
|
elif choice == "12":
|
||||||
break
|
|
||||||
elif choice == "13":
|
|
||||||
handle_display_stats(password_manager)
|
handle_display_stats(password_manager)
|
||||||
|
elif choice == "13":
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
print(colored("Invalid choice.", "red"))
|
print(colored("Invalid choice.", "red"))
|
||||||
|
|
||||||
|
@@ -93,7 +93,7 @@ def test_settings_menu_additional_backup(monkeypatch):
|
|||||||
tmp_path = Path(tmpdir)
|
tmp_path = Path(tmpdir)
|
||||||
pm, cfg_mgr, fp_mgr = setup_pm(tmp_path, monkeypatch)
|
pm, cfg_mgr, fp_mgr = setup_pm(tmp_path, monkeypatch)
|
||||||
|
|
||||||
inputs = iter(["9", "12"])
|
inputs = iter(["9", "13"])
|
||||||
with patch("main.handle_set_additional_backup_location") as handler:
|
with patch("main.handle_set_additional_backup_location") as handler:
|
||||||
with patch("builtins.input", side_effect=lambda *_: next(inputs)):
|
with patch("builtins.input", side_effect=lambda *_: next(inputs)):
|
||||||
main.handle_settings(pm)
|
main.handle_settings(pm)
|
||||||
|
Reference in New Issue
Block a user