Merge pull request #377 from PR0M3TH3AN/codex/add-option-to-unarchive-modified-entries

Add restore prompt after editing archived entry
This commit is contained in:
thePR0M3TH3AN
2025-07-07 19:38:23 -04:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -258,6 +258,7 @@ When choosing **Add Entry**, you can now select **Password**, **2FA (TOTP)**,
3. Enter new values or press **Enter** to keep the existing settings. 3. Enter new values or press **Enter** to keep the existing settings.
4. The updated entry is saved back to your encrypted vault. 4. The updated entry is saved back to your encrypted vault.
5. Archived entries are hidden from lists but can be viewed or restored from the **List Archived** menu. 5. Archived entries are hidden from lists but can be viewed or restored from the **List Archived** menu.
6. When editing an archived entry you'll be prompted to restore it after saving your changes.
### Using Secret Mode ### Using Secret Mode

View File

@@ -2096,6 +2096,11 @@ class PasswordManager:
exc_info=True, exc_info=True,
) )
updated_entry = self.entry_manager.retrieve_entry(index)
if updated_entry:
self._prompt_toggle_archive(updated_entry, index)
pause()
except Exception as e: except Exception as e:
logging.error(f"Error during modifying entry: {e}", exc_info=True) logging.error(f"Error during modifying entry: {e}", exc_info=True)
print(colored(f"Error: Failed to modify entry: {e}", "red")) print(colored(f"Error: Failed to modify entry: {e}", "red"))