Add tag editing from retrieval

This commit is contained in:
thePR0M3TH3AN
2025-07-08 15:09:23 -04:00
parent b6947cb297
commit a89b8d042b
2 changed files with 59 additions and 0 deletions

View File

@@ -1623,6 +1623,7 @@ class PasswordManager:
print(colored("C. Add Custom Field", "cyan"))
print(colored("H. Add Hidden Field", "cyan"))
print(colored("E. Edit", "cyan"))
print(colored("T. Add Tags", "cyan"))
choice = (
input("Select an action or press Enter to return: ").strip().lower()
@@ -1659,6 +1660,15 @@ class PasswordManager:
self.entry_manager.modify_entry(index, custom_fields=custom_fields)
self.is_dirty = True
self.last_update = time.time()
elif choice == "t":
tags_input = input("Enter tags (comma-separated): ").strip()
if tags_input:
new_tags = [t.strip() for t in tags_input.split(",") if t.strip()]
existing_tags = entry.get("tags", [])
tags = list({*existing_tags, *new_tags})
self.entry_manager.modify_entry(index, tags=tags)
self.is_dirty = True
self.last_update = time.time()
elif choice == "e":
self._entry_edit_menu(index, entry)
else: