mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +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("10. Set inactivity timeout")
|
||||
print("11. Lock Vault")
|
||||
print("12. Back")
|
||||
print("13. Stats")
|
||||
print("12. Stats")
|
||||
print("13. Back")
|
||||
choice = input("Select an option: ").strip()
|
||||
if choice == "1":
|
||||
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"))
|
||||
password_manager.unlock_vault()
|
||||
elif choice == "12":
|
||||
break
|
||||
elif choice == "13":
|
||||
handle_display_stats(password_manager)
|
||||
elif choice == "13":
|
||||
break
|
||||
else:
|
||||
print(colored("Invalid choice.", "red"))
|
||||
|
||||
|
@@ -93,7 +93,7 @@ def test_settings_menu_additional_backup(monkeypatch):
|
||||
tmp_path = Path(tmpdir)
|
||||
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("builtins.input", side_effect=lambda *_: next(inputs)):
|
||||
main.handle_settings(pm)
|
||||
|
Reference in New Issue
Block a user