Commit ab64bca
feat(vault-tui): create/edit cards in the add/edit form
The TUI `a`/`e` form now composes card (type 3) ciphers, not just logins
and secure notes. No backend change — it builds the `CardWrite` payload
that already rides `Request::Add`/`Edit` (CLI write path, PR #25).
- app.rs: the Type row cycles login → secure note → card; `blank_fields`
/ `visible_fields` grow the card rows (Holder/Brand/Number/Expiry/CVV,
with Number+CVV masked while unfocused). `submit` splits a single
`MM/YYYY` Expiry field via a local `parse_expiry` (mirrors the CLI's
`split_expiry`) and packs the card fields into `FormSubmit` (number/code
redacted in `Debug`). `new_edit` takes the cached `DetailView` and
prefills Brand/Expiry; secrets and the (unfetchable) cardholder start
blank = leave-unchanged.
- main.rs: `submit_form` builds `card: Option<CardWrite>` when the type is
a card and threads it into both Add and Edit.
- Tests: card add carries split expiry + redacts secrets, card edit
prefill/diff, `parse_expiry`; updated the type-toggle test for the
3-way cycle.
- docs: README TUI card note, CHANGELOG entry.
Identity TUI editing stays pending — it needs an identity write backend
first (no `IdentityWrite`/`from_plain` identity path yet).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 986670e commit ab64bca
4 files changed
Lines changed: 302 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
13 | 23 | | |
14 | 24 | | |
15 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
| |||
0 commit comments