Merge pull request #477 from PR0M3TH3AN/codex/show-tui-actions-for-supported-entries

Improve entry menu actions visibility
This commit is contained in:
thePR0M3TH3AN
2025-07-12 13:24:38 -04:00
committed by GitHub

View File

@@ -1730,6 +1730,7 @@ class PasswordManager:
"""Provide actions for a retrieved entry.""" """Provide actions for a retrieved entry."""
while True: while True:
archived = entry.get("archived", entry.get("blacklisted", False)) archived = entry.get("archived", entry.get("blacklisted", False))
entry_type = entry.get("type", EntryType.PASSWORD.value)
print(colored("\n[+] Entry Actions:", "green")) print(colored("\n[+] Entry Actions:", "green"))
if archived: if archived:
print(colored("U. Unarchive", "cyan")) print(colored("U. Unarchive", "cyan"))
@@ -1740,7 +1741,12 @@ class PasswordManager:
print(colored("H. Add Hidden Field", "cyan")) print(colored("H. Add Hidden Field", "cyan"))
print(colored("E. Edit", "cyan")) print(colored("E. Edit", "cyan"))
print(colored("T. Edit Tags", "cyan")) print(colored("T. Edit Tags", "cyan"))
print(colored("Q. Show QR codes", "cyan")) if entry_type in {
EntryType.SEED.value,
EntryType.MANAGED_ACCOUNT.value,
EntryType.NOSTR.value,
}:
print(colored("Q. Show QR codes", "cyan"))
choice = ( choice = (
input("Select an action or press Enter to return: ").strip().lower() input("Select an action or press Enter to return: ").strip().lower()