Merge pull request #67 from LazyBachelor/LPM-104

LPM-104 Upgrade Go and Charm Deps
This commit is contained in:
Robin Olsen
2026-03-18 07:23:11 -07:00
committed by GitHub
57 changed files with 424 additions and 360 deletions

View File

@@ -62,7 +62,7 @@ func CreateIssue(w http.ResponseWriter, r *http.Request) {
from := r.URL.Query().Get("from")
referer := r.Header.Get("Referer")
boardView := from == "board" || strings.Contains(referer, "board=true")
if boardView {
w.Header().Set("HX-Redirect", "/?board=true")
} else {
@@ -181,7 +181,7 @@ func UpdateIssue(w http.ResponseWriter, r *http.Request) {
from := r.URL.Query().Get("from")
referer := r.Header.Get("Referer")
boardView := from == "board" || strings.Contains(referer, "board=true")
if boardView {
w.Header().Set("HX-Redirect", "/?board=true")
} else {
@@ -218,7 +218,7 @@ func UpdateAssignee(w http.ResponseWriter, r *http.Request) {
// Check if we're in board view
referer := r.Header.Get("Referer")
boardView := strings.Contains(referer, "board=true")
if boardView {
w.Header().Set("HX-Redirect", "/?board=true&selected-issue="+issue.ID)
} else {
@@ -244,7 +244,7 @@ func DeleteIssue(w http.ResponseWriter, r *http.Request) {
from := r.URL.Query().Get("from")
referer := r.Header.Get("Referer")
boardView := from == "board" || strings.Contains(referer, "board=true")
if boardView {
w.Header().Set("HX-Redirect", "/?board=true")
} else {

View File

@@ -12,13 +12,13 @@ import (
"syscall"
"time"
"charm.land/bubbletea/v2"
"charm.land/lipgloss/v2"
"github.com/LazyBachelor/LazyPM/internal/app"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/internal/utils/browser"
"github.com/LazyBachelor/LazyPM/pkg/web/handler"
"github.com/LazyBachelor/LazyPM/pkg/web/server"
tea "github.com/charmbracelet/bubbletea"
)
type Config = models.Config
@@ -54,7 +54,7 @@ func (m tuiModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.width = msg.Width
m.height = msg.Height
return m, nil
case tea.KeyMsg:
case tea.KeyPressMsg:
switch msg.String() {
case "q", "esc", "ctrl+c":
select {
@@ -69,11 +69,14 @@ func (m tuiModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil
}
func (m tuiModel) View() string {
return lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, fmt.Sprintf(
func (m tuiModel) View() tea.View {
content := lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, fmt.Sprintf(
"Web server running at %s\n\nPress q, esc, or Ctrl+C to stop the task and server.\n",
m.address,
))
v := tea.NewView(content)
v.AltScreen = true
return v
}
func (w *Web) Run(ctx context.Context, config Config) error {
@@ -106,7 +109,6 @@ func (w *Web) Run(ctx context.Context, config Config) error {
address: address,
quitChan: uiQuitChan,
},
tea.WithAltScreen(),
)
screenDone = make(chan struct{})