Add desktop store and entry creation workflows

This commit is contained in:
2026-08-10 18:58:33 +02:00
parent 75d4ead3d8
commit bb650c2b5c
8 changed files with 1330 additions and 57 deletions

View File

@@ -35,6 +35,21 @@ impl EntryEditor {
}
}
pub fn new_entry(
document: EntryDocument,
password: SecretBytes,
) -> Result<Self, DocumentError> {
let mut editor = Self::new(document);
editor.add_after(None)?;
let id = editor
.focused
.expect("new entry receives its password field");
if !password.expose().is_empty() {
editor.replace_value(id, password)?;
}
Ok(editor)
}
pub fn entry(&self) -> String {
self.document.path().to_string()
}