Improve recent targets and workflow context

This commit is contained in:
Joe Julian
2026-04-01 16:43:15 -07:00
parent 23853c479a
commit 2fded8a403
3 changed files with 134 additions and 13 deletions
+22 -2
View File
@@ -2974,11 +2974,31 @@ func (u *ui) detailPanelContent(gtx layout.Context) layout.Dimensions {
}
rows := []layout.Widget{
func(gtx layout.Context) layout.Dimensions {
lbl := material.Label(u.theme, titleSize, item.Title)
title := item.Title
if u.state.Section == appstate.SectionRecycleBin {
title = "Deleted: " + title
}
lbl := material.Label(u.theme, titleSize, title)
lbl.Color = accentColor
return lbl.Layout(gtx)
},
layout.Spacer{Height: titlePad}.Layout,
func(gtx layout.Context) layout.Dimensions {
if u.state.Section != appstate.SectionRecycleBin {
return layout.Dimensions{}
}
return compactCard(gtx, func(gtx layout.Context) layout.Dimensions {
lbl := material.Label(u.theme, unit.Sp(12), "This entry is in the recycle bin. Review it, copy from it, or restore it back into the vault.")
lbl.Color = mutedColor
return lbl.Layout(gtx)
})
},
layout.Spacer{Height: func() unit.Dp {
if u.state.Section == appstate.SectionRecycleBin {
return unit.Dp(8)
}
return 0
}()}.Layout,
detailLine(u.theme, "Path", strings.Join(u.displayEntryPath(item.Path), " / ")),
layout.Spacer{Height: sectionGap}.Layout,
detailLine(u.theme, "Username", item.Username),
@@ -3062,7 +3082,7 @@ func (u *ui) detailPanelContent(gtx layout.Context) layout.Dimensions {
}),
)
case appstate.SectionRecycleBin:
return tonedButton(gtx, u.theme, &u.restoreEntry, "Restore Entry")
return tonedButton(gtx, u.theme, &u.restoreEntry, "Restore Entry To Vault")
default:
return layout.Flex{Spacing: layout.SpaceStart}.Layout(gtx,
layout.Rigid(func(gtx layout.Context) layout.Dimensions {