chore: upgrade dependencies. remove deprecated code. conform to linter style

This commit is contained in:
2025-08-11 22:51:50 +02:00
parent bfe490cd5c
commit e24201c204
15 changed files with 133 additions and 142 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ func NewInputBox() InputState {
return InputState{
Input: input,
Style: InputboxStyle.Copy(),
Style: InputboxStyle,
}
}
@@ -65,12 +65,12 @@ func (s InputState) Update(msg tea.Msg) (InputState, tea.Cmd) {
func (s *InputState) Focus() {
s.Input.Focus()
s.Style = s.Style.Copy().BorderForeground(ui.AccentColor)
s.Style = s.Style.BorderForeground(ui.AccentColor)
}
func (s *InputState) Blur() {
s.Input.Blur()
s.Style = s.Style.Copy().BorderForeground(ui.PrimaryColor)
s.Style = s.Style.BorderForeground(ui.PrimaryColor)
}
func (s *InputState) SetSize(width int) {
+16 -16
View File
@@ -57,7 +57,7 @@ type State struct {
func NewMainScreen(client *irc.Client) State {
newViewport := viewport.New(0, 0)
newViewport.Style = MessagesStyle.Copy()
newViewport.Style = MessagesStyle
return State{
Client: client,
@@ -204,24 +204,24 @@ func (s State) Update(msg tea.Msg) (State, tea.Cmd) {
}
func (s *State) Focus() {
s.Viewport.Style = s.Viewport.Style.Copy().BorderForeground(ui.AccentColor)
s.Viewport.Style = s.Viewport.Style.BorderForeground(ui.AccentColor)
tab = tab.Copy().BorderForeground(ui.AccentColor)
leftArrowDim = leftArrowDim.Copy().BorderForeground(ui.AccentColor)
rightArrowDim = rightArrowDim.Copy().BorderForeground(ui.AccentColor)
leftArrowLit = leftArrowLit.Copy().BorderForeground(ui.AccentColor)
rightArrowLit = rightArrowLit.Copy().BorderForeground(ui.AccentColor)
tabLine = tabLine.Copy().Foreground(ui.AccentColor)
tab = tab.BorderForeground(ui.AccentColor)
leftArrowDim = leftArrowDim.BorderForeground(ui.AccentColor)
rightArrowDim = rightArrowDim.BorderForeground(ui.AccentColor)
leftArrowLit = leftArrowLit.BorderForeground(ui.AccentColor)
rightArrowLit = rightArrowLit.BorderForeground(ui.AccentColor)
tabLine = tabLine.Foreground(ui.AccentColor)
}
func (s *State) Blur() {
s.Viewport.Style = s.Viewport.Style.Copy().BorderForeground(ui.PrimaryColor)
s.Viewport.Style = s.Viewport.Style.BorderForeground(ui.PrimaryColor)
tab = tab.Copy().BorderForeground(ui.PrimaryColor)
leftArrowDim = leftArrowDim.Copy().BorderForeground(ui.PrimaryColor)
rightArrowDim = rightArrowDim.Copy().BorderForeground(ui.PrimaryColor)
leftArrowLit = leftArrowLit.Copy().BorderForeground(ui.PrimaryColor)
rightArrowLit = rightArrowLit.Copy().BorderForeground(ui.PrimaryColor)
tabLine = tabLine.Copy().Foreground(ui.PrimaryColor)
tab = tab.BorderForeground(ui.PrimaryColor)
leftArrowDim = leftArrowDim.BorderForeground(ui.PrimaryColor)
rightArrowDim = rightArrowDim.BorderForeground(ui.PrimaryColor)
leftArrowLit = leftArrowLit.BorderForeground(ui.PrimaryColor)
rightArrowLit = rightArrowLit.BorderForeground(ui.PrimaryColor)
tabLine = tabLine.Foreground(ui.PrimaryColor)
}
func (s *State) SetSize(width, height int) {
@@ -232,7 +232,7 @@ func (s *State) SetSize(width, height int) {
// and also because we ceil the sidepanel's width
// -3 for the tab bar height
newWidth := int(math.Floor(float64(width) * 8 / 10))
newHeight := height - s.InputBox.Style.GetVerticalFrameSize() - 3
newHeight := height - s.InputBox.Style.GetVerticalFrameSize() - 3 - 1
s.Viewport.Width = newWidth
s.Viewport.Height = newHeight
+1 -1
View File
@@ -60,7 +60,7 @@ func (s *SidePanelState) getLatestNicks() []string {
func NewSidePanel(client *irc.Client) *SidePanelState {
newViewport := viewport.New(0, 0)
newViewport.Style = SidePanelStyle.Copy()
newViewport.Style = SidePanelStyle
return &SidePanelState{
Client: client,
+8 -8
View File
@@ -22,16 +22,16 @@ import (
)
var (
InputboxStyle = ui.DefaultStyle.Copy().
InputboxStyle = ui.DefaultStyle.
Border(lipgloss.NormalBorder(), true).
Padding(0, 1).
Width(ui.MainStyle.GetWidth()).
BorderForeground(ui.AccentColor)
MessagesStyle = ui.DefaultStyle.Copy().
MessagesStyle = ui.DefaultStyle.
Border(lipgloss.NormalBorder(), false, true, true, true).
Width(ui.MainStyle.GetWidth() * 8 / 10).
BorderForeground(ui.PrimaryColor)
SidePanelStyle = ui.DefaultStyle.Copy().
SidePanelStyle = ui.DefaultStyle.
Border(lipgloss.NormalBorder(), true).
Width(ui.MainStyle.GetWidth() * 2 / 10).
BorderForeground(ui.PrimaryColor)
@@ -85,26 +85,26 @@ var (
Foreground(ui.PrimaryColor).
Padding(0, 1)
activeTab = tab.Copy().
activeTab = tab.
Border(activeTabBorder, true).
BorderForeground(ui.AccentColor).
Foreground(ui.AccentColor).
Italic(true).
Bold(true)
leftArrowDim = tab.Copy().
leftArrowDim = tab.
Border(leftArrowBorder, true).
BorderForeground(ui.PrimaryColor).
Foreground(ui.DisabledColor)
rightArrowDim = tab.Copy().
rightArrowDim = tab.
Border(rightArrowBorder, true).
BorderForeground(ui.PrimaryColor).
Foreground(ui.DisabledColor)
leftArrowLit = tab.Copy().
leftArrowLit = tab.
Border(leftArrowBorder, true).
Foreground(ui.PrimaryColor)
rightArrowLit = tab.Copy().
rightArrowLit = tab.
Border(rightArrowBorder, true).
Foreground(ui.PrimaryColor)