feat: the value's keys on the line below it: reveal and copy (#8)

This commit was merged in pull request #8.
This commit is contained in:
keb committed 2026-10-11 10:38:00 +02:00
1 parent 71396f1e02
commit c8abc1dc95
4 files changed
+45 -34

No files matched your search

+1 -1
View File
@@ -395,7 +395,7 @@ func New(providers []provider.Provider, opts Options) Model {
if opts.Keys != nil {
m.keys = *opts.Keys
}
m.detail.RevealKey, m.detail.VersionsKey = keys.Name(m.keys.Reveal), keys.Name(m.keys.Versions)
m.detail.RevealKey, m.detail.VersionsKey, m.detail.CopyKey = keys.Name(m.keys.Reveal), keys.Name(m.keys.Versions), keys.Name(m.keys.Copy)
m.revealTimeout, m.hideOnBlur = opts.RevealTimeout, opts.HideOnBlur
m.expiryWarning = opts.ExpiryWarning
m.handlerSetup = opts.HandlerSetup
+2 -2
View File
@@ -204,7 +204,7 @@ func TestObjectTypeTabs(t *testing.T) {
t.Fatalf("selected = %q", s)
}
screen := d.screen()
for _, want := range []string{"key type RSA 2048", "ops sign, verify", "space to show public key"} {
for _, want := range []string{"key type RSA 2048", "ops sign, verify", "space to show the public key"} {
if !strings.Contains(screen, want) {
t.Errorf("missing %q:\n%s", want, screen)
}
@@ -979,7 +979,7 @@ func TestRebindingShowsEverywhere(t *testing.T) {
d := newDriverOpts(t, Options{Keys: &km})
d.keys("3")
scr := d.screen()
if !strings.Contains(scr, "(z to reveal)") || strings.Contains(scr, "space to reveal") {
if !strings.Contains(scr, "z to reveal") || strings.Contains(scr, "space to reveal") {
t.Errorf("detail hint doesn't follow the binding:\n%s", scr)
}
if !strings.Contains(lastLine(scr), "z reveal/hide") {
+7 -7
View File
@@ -11,13 +11,13 @@
│ kv-restricted ││ ref @Microsoft.KeyVault(SecretUri=https://kv-app-prod.vau│
│ ││ lt.azure.net/secrets/db-password) │
│ ││ │
│ ││ value •••••••• (space to reveal) │
│ ││ │
╰────────────────────── 1 of 3 ─╯│ versions 3 · v to browse │
╭─ [3] Secrets - Keys - Certs ──╮│ ▸ 3f9c2a 2026-09-01 current │
│ db-password ││ 91d3e0 2026-03-01 expired │
│ api-key ││ 0a77c4 2025-09-01 disabled │
│ legacy-token (disabled) ││ │
│ ││ value •••••••• │
│ ││ space to reveal · y to copy │
╰────────────────────── 1 of 3 ─╯│ │
╭─ [3] Secrets - Keys - Certs ──╮│ versions 3 · v to browse │
│ db-password ││ ▸ 3f9c2a 2026-09-01 current │
│ api-key ││ 91d3e0 2026-03-01 expired │
│ legacy-token (disabled) ││ 0a77c4 2025-09-01 disabled │
│ ││ │
│ ││ │
│ ││ │