Allow editing Key field in Key/Value entries

This commit is contained in:
thePR0M3TH3AN
2025-07-30 15:50:48 -04:00
parent 0dd5b1f301
commit 3937ccfb75

View File

@@ -2173,7 +2173,9 @@ class PasswordManager:
child_fingerprint=child_fp,
)
print(colored("\n[+] Edit Menu:", "green"))
print(colored("L. Edit Label (key)", "cyan"))
print(colored("L. Edit Label", "cyan"))
if entry_type == EntryType.KEY_VALUE.value:
print(colored("K. Edit Key", "cyan"))
if entry_type == EntryType.PASSWORD.value:
print(colored("U. Edit Username", "cyan"))
print(colored("R. Edit URL", "cyan"))
@@ -2184,11 +2186,17 @@ class PasswordManager:
if not choice:
break
if choice == "l":
new_label = input("New label (key): ").strip()
new_label = input("New label: ").strip()
if new_label:
self.entry_manager.modify_entry(index, label=new_label)
self.is_dirty = True
self.last_update = time.time()
elif entry_type == EntryType.KEY_VALUE.value and choice == "k":
new_key = input("New key: ").strip()
if new_key:
self.entry_manager.modify_entry(index, key=new_key)
self.is_dirty = True
self.last_update = time.time()
elif entry_type == EntryType.PASSWORD.value and choice == "u":
new_username = input("New username: ").strip()
self.entry_manager.modify_entry(index, username=new_username)