Refine settings and empty-state affordances
This commit is contained in:
@@ -280,6 +280,7 @@ type ui struct {
|
|||||||
expandMoreIcon *widget.Icon
|
expandMoreIcon *widget.Icon
|
||||||
expandLessIcon *widget.Icon
|
expandLessIcon *widget.Icon
|
||||||
chevronDownIcon *widget.Icon
|
chevronDownIcon *widget.Icon
|
||||||
|
settingsIcon *widget.Icon
|
||||||
clipboardWriter clipboard.Writer
|
clipboardWriter clipboard.Writer
|
||||||
loadingMessage string
|
loadingMessage string
|
||||||
lifecycleMode string
|
lifecycleMode string
|
||||||
@@ -437,6 +438,7 @@ func newUIWithState(mode string, sess appstate.CurrentSession, paths statePaths)
|
|||||||
u.expandMoreIcon, _ = widget.NewIcon(icons.NavigationExpandMore)
|
u.expandMoreIcon, _ = widget.NewIcon(icons.NavigationExpandMore)
|
||||||
u.expandLessIcon, _ = widget.NewIcon(icons.NavigationExpandLess)
|
u.expandLessIcon, _ = widget.NewIcon(icons.NavigationExpandLess)
|
||||||
u.chevronDownIcon, _ = widget.NewIcon(icons.NavigationArrowDropDown)
|
u.chevronDownIcon, _ = widget.NewIcon(icons.NavigationArrowDropDown)
|
||||||
|
u.settingsIcon, _ = widget.NewIcon(icons.ActionSettings)
|
||||||
u.passwordProfile.SetText("strong")
|
u.passwordProfile.SetText("strong")
|
||||||
u.securityCipher.SetText(vault.CipherChaCha20)
|
u.securityCipher.SetText(vault.CipherChaCha20)
|
||||||
u.securityKDF.SetText(vault.KDFArgon2)
|
u.securityKDF.SetText(vault.KDFArgon2)
|
||||||
@@ -1601,14 +1603,17 @@ func (u *ui) listEmptyMessage() string {
|
|||||||
}
|
}
|
||||||
switch u.state.Section {
|
switch u.state.Section {
|
||||||
case appstate.SectionAPITokens:
|
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:
|
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:
|
case appstate.SectionTemplates:
|
||||||
return "Templates are not available in this build."
|
return "Templates are not available in this build."
|
||||||
case appstate.SectionRecycleBin:
|
case appstate.SectionRecycleBin:
|
||||||
return "Recycle Bin is empty."
|
return "Recycle Bin is empty."
|
||||||
default:
|
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."
|
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(u.syncButtonGroup),
|
||||||
layout.Rigid(layout.Spacer{Width: unit.Dp(8)}.Layout),
|
layout.Rigid(layout.Spacer{Width: unit.Dp(8)}.Layout),
|
||||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
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(layout.Spacer{Width: unit.Dp(8)}.Layout),
|
||||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||||
|
|||||||
Reference in New Issue
Block a user