activateHamrpass writes the key onto the hamrpass profile (seeding the entry if the user removed it from config.yaml), switches active, rebuilds the client, and runs the shared confirmation (probe path, since hamrpass now has a key).
(key string)
| 332 | // activateHamrpass writes the key onto the hamrpass profile (seeding the entry |
| 333 | // if the user removed it from config.yaml), switches active, rebuilds the |
| 334 | // client, and runs the shared confirmation (probe path, since hamrpass now has |
| 335 | // a key). |
| 336 | func (m *Model) activateHamrpass(key string) tea.Cmd { |
| 337 | hp := m.cfg.EnsureHamrpass() |
| 338 | hp.Key = key |
| 339 | if err := m.cfg.SetActive("hamrpass"); err != nil { |
| 340 | m.appendLine(styleError.Render("⚠ " + err.Error())) |
| 341 | return nil |
| 342 | } |
| 343 | m.rebuildClient() |
| 344 | return m.confirmActive("hamrpass") |
| 345 | } |
no test coverage detected