lots of changes and reducing dependency imports

This commit is contained in:
Robin Olsen
2026-02-28 16:39:50 +01:00
parent 697b17e890
commit ba0115d1bc
54 changed files with 458 additions and 327 deletions

View File

@@ -2,11 +2,14 @@ package taskui
import (
"charm.land/lipgloss/v2"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/internal/style"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/huh"
)
type Questions = models.Questions
type QuestionnaireModel struct {
Questions
form *huh.Form

View File

@@ -5,11 +5,14 @@ import (
"strings"
"charm.land/lipgloss/v2"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/internal/style"
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
)
type TaskDetails = models.TaskDetails
type TaskModel struct {
TaskDetails
keys TaskHelpKeys

View File

@@ -1,39 +0,0 @@
package taskui
import "github.com/charmbracelet/huh"
type TaskDetails struct {
Title string
Description string
TimeToComplete string
Difficulty string
}
func (td TaskDetails) WithTitle(title string) TaskDetails {
td.Title = title
return td
}
func (td TaskDetails) WithDescription(description string) TaskDetails {
td.Description = description
return td
}
func (td TaskDetails) WithTimeToComplete(time string) TaskDetails {
td.TimeToComplete = time
return td
}
func (td TaskDetails) WithDifficulty(difficulty string) TaskDetails {
td.Difficulty = difficulty
return td
}
type Questions []*huh.Group
func (q Questions) With(group *huh.Group) Questions {
if group == nil {
return q
}
return append(q, group)
}