Improve KeePassGO vault navigation UX
This commit is contained in:
+5
-2
@@ -50,7 +50,7 @@ func (u *ui) loadSelectedEntryIntoEditor() {
|
||||
u.entryURL.SetText("")
|
||||
u.entryNotes.SetText("")
|
||||
u.entryTags.SetText("")
|
||||
u.entryPath.SetText(strings.Join(u.state.CurrentPath, " / "))
|
||||
u.entryPath.SetText(strings.Join(u.displayPath(), " / "))
|
||||
u.entryFields.SetText("")
|
||||
u.attachmentName.SetText("")
|
||||
u.attachmentPath.SetText("")
|
||||
@@ -65,7 +65,7 @@ func (u *ui) loadSelectedEntryIntoEditor() {
|
||||
u.entryURL.SetText(item.URL)
|
||||
u.entryNotes.SetText(item.Notes)
|
||||
u.entryTags.SetText(strings.Join(item.Tags, ", "))
|
||||
u.entryPath.SetText(strings.Join(item.Path, " / "))
|
||||
u.entryPath.SetText(strings.Join(u.displayEntryPath(item.Path), " / "))
|
||||
u.entryFields.SetText(marshalFields(item.Fields))
|
||||
u.attachmentName.SetText("")
|
||||
u.attachmentPath.SetText("")
|
||||
@@ -330,6 +330,9 @@ func (u *ui) generatePasswordAction() error {
|
||||
|
||||
func (u *ui) editorEntry() (vault.Entry, error) {
|
||||
path := parsePath(u.entryPath.Text())
|
||||
if root := u.hiddenVaultRoot(); root != "" && (len(path) == 0 || path[0] != root) {
|
||||
path = append([]string{root}, path...)
|
||||
}
|
||||
fields, err := parseFields(u.entryFields.Text())
|
||||
if err != nil {
|
||||
return vault.Entry{}, err
|
||||
|
||||
Reference in New Issue
Block a user