Add basic issue view, styling and ux need improvement
This commit is contained in:
@@ -4,17 +4,22 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/service"
|
||||
"github.com/LazyBachelor/LazyPM/pkg/tui/views"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
type TUIConfig = service.Config
|
||||
|
||||
func Run(ctx context.Context, config TUIConfig) error {
|
||||
_, cleanup, err := service.NewServices(ctx, config)
|
||||
func Run(ctx context.Context, config TUIConfig) (tea.Model, error) {
|
||||
svc, cleanup, err := service.NewServices(ctx, config)
|
||||
if err != nil {
|
||||
return err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer cleanup()
|
||||
|
||||
return nil
|
||||
app := tea.NewProgram(views.NewDashboardView(svc),
|
||||
tea.WithAltScreen(), tea.WithMouseAllMotion())
|
||||
|
||||
return app.Run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user