Upgrade golangci-lint
This commit is contained in:
@@ -560,10 +560,10 @@ func newUIWithSession(mode string, sess appstate.CurrentSession, paths ...stateP
|
||||
|
||||
func newUIWithState(mode string, sess appstate.CurrentSession, paths statePaths) *ui {
|
||||
th := material.NewTheme()
|
||||
th.Palette.Bg = bgColor
|
||||
th.Palette.Fg = color.NRGBA{R: 31, G: 29, B: 27, A: 255}
|
||||
th.Palette.ContrastBg = accentColor
|
||||
th.Palette.ContrastFg = color.NRGBA{R: 255, G: 252, B: 247, A: 255}
|
||||
th.Bg = bgColor
|
||||
th.Fg = color.NRGBA{R: 31, G: 29, B: 27, A: 255}
|
||||
th.ContrastBg = accentColor
|
||||
th.ContrastFg = color.NRGBA{R: 255, G: 252, B: 247, A: 255}
|
||||
|
||||
u := &ui{
|
||||
mode: mode,
|
||||
@@ -1535,7 +1535,7 @@ func approvalFact(theme *material.Theme, title, primary, secondary string) layou
|
||||
layout.Rigid(layout.Spacer{Height: unit.Dp(2)}.Layout),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(theme, unit.Sp(16), strings.TrimSpace(primary))
|
||||
lbl.Color = theme.Palette.Fg
|
||||
lbl.Color = theme.Fg
|
||||
return lbl.Layout(gtx)
|
||||
}),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
@@ -1578,7 +1578,7 @@ func (u *ui) aboutDetailPanel(gtx layout.Context) layout.Dimensions {
|
||||
},
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(14), currentAppVersion())
|
||||
lbl.Color = u.theme.Palette.Fg
|
||||
lbl.Color = u.theme.Fg
|
||||
return lbl.Layout(gtx)
|
||||
},
|
||||
}
|
||||
@@ -1600,7 +1600,7 @@ func aboutFact(theme *material.Theme, title, primary, secondary string) layout.W
|
||||
layout.Rigid(layout.Spacer{Height: unit.Dp(2)}.Layout),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(theme, unit.Sp(16), primary)
|
||||
lbl.Color = theme.Palette.Fg
|
||||
lbl.Color = theme.Fg
|
||||
return lbl.Layout(gtx)
|
||||
}),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
@@ -1690,7 +1690,7 @@ func (u *ui) listPanelSearchRow(gtx layout.Context) layout.Dimensions {
|
||||
}
|
||||
return u.outlinedFieldState(gtx, u.isFocused(focusSearch), func(gtx layout.Context) layout.Dimensions {
|
||||
editor := material.Editor(u.theme, &u.search, u.searchPlaceholder())
|
||||
editor.Color = u.theme.Palette.Fg
|
||||
editor.Color = u.theme.Fg
|
||||
editor.HintColor = mutedColor
|
||||
return layout.UniformInset(unit.Dp(10)).Layout(gtx, editor.Layout)
|
||||
})
|
||||
@@ -3150,7 +3150,7 @@ func syncDialogSummaryCard(gtx layout.Context, th *material.Theme, purpose syncD
|
||||
layout.Rigid(layout.Spacer{Height: unit.Dp(2)}.Layout),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(th, unit.Sp(14), syncDialogSummaryText(purpose, source, direction))
|
||||
lbl.Color = th.Palette.Fg
|
||||
lbl.Color = th.Fg
|
||||
return lbl.Layout(gtx)
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -802,8 +802,8 @@ func (u *ui) prefillAdvancedSyncRemoteFromSavedBinding() {
|
||||
}
|
||||
|
||||
func (u *ui) syncDialogTitle() string {
|
||||
switch {
|
||||
case u.syncDialogPurpose == syncDialogPurposeRemoteSetup:
|
||||
switch u.syncDialogPurpose {
|
||||
case syncDialogPurposeRemoteSetup:
|
||||
if _, ok := u.selectedVaultRemoteBinding(); ok {
|
||||
return "Remote Sync Settings"
|
||||
}
|
||||
@@ -814,8 +814,8 @@ func (u *ui) syncDialogTitle() string {
|
||||
}
|
||||
|
||||
func (u *ui) syncDialogDescription() string {
|
||||
switch {
|
||||
case u.syncDialogPurpose == syncDialogPurposeRemoteSetup:
|
||||
switch u.syncDialogPurpose {
|
||||
case syncDialogPurposeRemoteSetup:
|
||||
if _, ok := u.selectedVaultRemoteBinding(); ok {
|
||||
return "Review or change this vault's saved WebDAV target, credentials, and sync mode."
|
||||
}
|
||||
@@ -826,8 +826,8 @@ func (u *ui) syncDialogDescription() string {
|
||||
}
|
||||
|
||||
func (u *ui) syncDialogConfirmButtonLabel() string {
|
||||
switch {
|
||||
case u.syncDialogPurpose == syncDialogPurposeRemoteSetup:
|
||||
switch u.syncDialogPurpose {
|
||||
case syncDialogPurposeRemoteSetup:
|
||||
if _, ok := u.selectedVaultRemoteBinding(); ok {
|
||||
return "Save Remote Sync Settings"
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ func settingsSummaryCard(gtx layout.Context, th *material.Theme, title, body str
|
||||
layout.Rigid(layout.Spacer{Height: unit.Dp(2)}.Layout),
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(th, unit.Sp(13), body)
|
||||
lbl.Color = th.Palette.Fg
|
||||
lbl.Color = th.Fg
|
||||
return lbl.Layout(gtx)
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -199,7 +199,7 @@ func (u *ui) syncPasswordField(gtx layout.Context) layout.Dimensions {
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
field := func(gtx layout.Context) layout.Dimensions {
|
||||
editor := material.Editor(u.theme, &u.syncRemotePassword, "Remote Password")
|
||||
editor.Color = u.theme.Palette.Fg
|
||||
editor.Color = u.theme.Fg
|
||||
editor.HintColor = mutedColor
|
||||
return layout.UniformInset(unit.Dp(10)).Layout(gtx, editor.Layout)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user