Reset password peek across view changes

This commit is contained in:
Joe Julian
2026-03-29 17:27:19 -07:00
parent bda28eef4b
commit 8ce924e08f
4 changed files with 75 additions and 5 deletions
+12 -1
View File
@@ -386,20 +386,27 @@ func (u *ui) selectedAttachmentNames() []string {
}
func (u *ui) showEntriesSection() {
u.resetPasswordPeek()
u.state.ShowSection(appstate.SectionEntries)
u.filter()
}
func (u *ui) showTemplatesSection() {
u.resetPasswordPeek()
u.state.ShowSection(appstate.SectionTemplates)
u.filter()
}
func (u *ui) showRecycleBinSection() {
u.resetPasswordPeek()
u.state.ShowSection(appstate.SectionRecycleBin)
u.filter()
}
func (u *ui) resetPasswordPeek() {
u.showPassword = false
}
func (u *ui) childGroups() []string {
u.state.SetSearchQuery(u.search.Text())
groups, err := u.state.ChildGroups()
@@ -506,6 +513,7 @@ func (u *ui) createVaultAction() error {
u.vaultPath.SetText(u.saveAsTargetPath())
u.noteRecentVault(u.saveAsTargetPath())
}
u.resetPasswordPeek()
u.currentPath = append([]string(nil), u.state.CurrentPath...)
u.editingEntry = false
u.filter()
@@ -526,6 +534,7 @@ func (u *ui) openVaultAction() error {
return err
}
u.noteRecentVault(path)
u.resetPasswordPeek()
u.currentPath = append([]string(nil), u.state.CurrentPath...)
u.restoreRecentVaultGroup(path)
u.editingEntry = false
@@ -573,6 +582,7 @@ func (u *ui) openRemoteAction() error {
u.remotePassword.Text(),
u.rememberRemoteAuth.Value,
)
u.resetPasswordPeek()
u.enterHiddenVaultRoot()
u.editingEntry = false
u.filter()
@@ -585,7 +595,7 @@ func (u *ui) lockAction() error {
return err
}
u.currentPath = append([]string(nil), u.state.CurrentPath...)
u.showPassword = false
u.resetPasswordPeek()
u.editingEntry = false
u.filter()
return nil
@@ -600,6 +610,7 @@ func (u *ui) unlockAction() error {
if err := u.state.Unlock(key); err != nil {
return err
}
u.resetPasswordPeek()
u.currentPath = append([]string(nil), u.state.CurrentPath...)
u.editingEntry = false
u.filter()