Added bento :)

This commit is contained in:
2026-05-01 14:10:22 -06:00
parent fec14022cd
commit 9ea2cf8c34
17 changed files with 1304 additions and 253 deletions
+18 -8
View File
@@ -7,20 +7,23 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/atridad/gitea-wrapped/pkg/models"
"github.com/atridad/wrapped-cli/pkg/models"
)
type ReportScreen struct {
stats *models.UserStats
page int
maxPages int
stats *models.UserStats
page int
maxPages int
exportFile string
}
func NewReportScreen(stats *models.UserStats) *ReportScreen {
exportFile, _ := ExportReport(stats)
return &ReportScreen{
stats: stats,
page: 0,
maxPages: 3,
stats: stats,
page: 0,
maxPages: 3,
exportFile: exportFile,
}
}
@@ -67,7 +70,14 @@ func (rs *ReportScreen) View() string {
Foreground(lipgloss.Color("8")).
Render(fmt.Sprintf("Page %d/%d | ← → to navigate | q to quit", rs.page+1, rs.maxPages))
return header + "\n" + content + "\n\n" + footer
report := header + "\n" + content + "\n\n" + footer
if rs.exportFile != "" {
report += "\n" + lipgloss.NewStyle().
Foreground(lipgloss.Color("10")).
Render(fmt.Sprintf("✓ Report saved: %s", rs.exportFile))
}
return report
}
func (rs *ReportScreen) renderOverviewPage() string {