Refine settings and empty-state affordances
This commit is contained in:
@@ -280,6 +280,7 @@ type ui struct {
|
||||
expandMoreIcon *widget.Icon
|
||||
expandLessIcon *widget.Icon
|
||||
chevronDownIcon *widget.Icon
|
||||
settingsIcon *widget.Icon
|
||||
clipboardWriter clipboard.Writer
|
||||
loadingMessage string
|
||||
lifecycleMode string
|
||||
@@ -437,6 +438,7 @@ func newUIWithState(mode string, sess appstate.CurrentSession, paths statePaths)
|
||||
u.expandMoreIcon, _ = widget.NewIcon(icons.NavigationExpandMore)
|
||||
u.expandLessIcon, _ = widget.NewIcon(icons.NavigationExpandLess)
|
||||
u.chevronDownIcon, _ = widget.NewIcon(icons.NavigationArrowDropDown)
|
||||
u.settingsIcon, _ = widget.NewIcon(icons.ActionSettings)
|
||||
u.passwordProfile.SetText("strong")
|
||||
u.securityCipher.SetText(vault.CipherChaCha20)
|
||||
u.securityKDF.SetText(vault.KDFArgon2)
|
||||
@@ -1601,14 +1603,17 @@ func (u *ui) listEmptyMessage() string {
|
||||
}
|
||||
switch u.state.Section {
|
||||
case appstate.SectionAPITokens:
|
||||
return "No API tokens match the current filter."
|
||||
return "No API tokens yet. Issue one to grant scoped gRPC access to an external tool."
|
||||
case appstate.SectionAPIAudit:
|
||||
return "No API audit events match the current filter."
|
||||
return "No API audit events yet. Approval prompts, denials, and token actions will appear here."
|
||||
case appstate.SectionTemplates:
|
||||
return "Templates are not available in this build."
|
||||
case appstate.SectionRecycleBin:
|
||||
return "Recycle Bin is empty."
|
||||
default:
|
||||
if len(u.displayPath()) > 0 {
|
||||
return "No entries in this group yet. Add one or open a subgroup."
|
||||
}
|
||||
return "Create or open a vault, then add an entry to get started."
|
||||
}
|
||||
}
|
||||
@@ -2449,7 +2454,12 @@ func (u *ui) headerActions(gtx layout.Context) layout.Dimensions {
|
||||
layout.Rigid(u.syncButtonGroup),
|
||||
layout.Rigid(layout.Spacer{Width: unit.Dp(8)}.Layout),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
return tonedButton(gtx, u.theme, &u.openSecuritySettings, "Security")
|
||||
btn := material.IconButton(u.theme, &u.openSecuritySettings, u.settingsIcon, "Vault settings")
|
||||
btn.Background = selectedColor
|
||||
btn.Color = accentColor
|
||||
btn.Size = unit.Dp(18)
|
||||
btn.Inset = layout.UniformInset(unit.Dp(8))
|
||||
return btn.Layout(gtx)
|
||||
}),
|
||||
layout.Rigid(layout.Spacer{Width: unit.Dp(8)}.Layout),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
|
||||
Reference in New Issue
Block a user