Merge pull request #372 from PR0M3TH3AN/codex/add-key/value-option-to-submenu

Add Key/Value entry option
This commit is contained in:
thePR0M3TH3AN
2025-07-07 18:32:21 -04:00
committed by GitHub

View File

@@ -269,6 +269,8 @@ def print_matches(
print(color_text(" Type: PGP Key", "index")) print(color_text(" Type: PGP Key", "index"))
elif etype == EntryType.NOSTR.value: elif etype == EntryType.NOSTR.value:
print(color_text(" Type: Nostr Key", "index")) print(color_text(" Type: Nostr Key", "index"))
elif etype == EntryType.KEY_VALUE.value:
print(color_text(" Type: Key/Value", "index"))
else: else:
if website: if website:
print(color_text(f" Label: {website}", "index")) print(color_text(f" Label: {website}", "index"))
@@ -805,6 +807,7 @@ def display_menu(
print(color_text("4. Seed Phrase", "menu")) print(color_text("4. Seed Phrase", "menu"))
print(color_text("5. Nostr Key Pair", "menu")) print(color_text("5. Nostr Key Pair", "menu"))
print(color_text("6. PGP Key", "menu")) print(color_text("6. PGP Key", "menu"))
print(color_text("7. Key/Value", "menu"))
sub_choice = input( sub_choice = input(
"Select entry type or press Enter to go back: " "Select entry type or press Enter to go back: "
).strip() ).strip()
@@ -827,6 +830,9 @@ def display_menu(
elif sub_choice == "6": elif sub_choice == "6":
password_manager.handle_add_pgp() password_manager.handle_add_pgp()
break break
elif sub_choice == "7":
password_manager.handle_add_key_value()
break
elif not sub_choice: elif not sub_choice:
break break
else: else: