feat: Ability to edit & remove by name (not index only) #44

Merged
awiteb merged 3 commits from awiteb/fix-36 into master 2024-05-11 07:43:07 +02:00 AGit
Showing only changes of commit 31afe4fd58 - Show all commits

View file

@ -50,6 +50,7 @@ pub struct Add {
impl LprsCommand for Add {
fn run(mut self, mut vault_manager: Vaults) -> LprsResult<()> {
if !self.vault_info.is_empty() {
self.vault_info.name = self.vault_info.name.trim().to_string();
self.vault_info.password = utils::user_password(self.password, "Vault password:")?;
self.vault_info.custom_fields = self.custom_fields.into_iter().collect();
vault_manager.add_vault(self.vault_info);