first commit after chaning git structure on pc

This commit is contained in:
2026-02-16 11:42:43 +01:00
commit f62b28d29b
52 changed files with 8112 additions and 0 deletions

55
pkg/tui/breadcrumbs.go Normal file
View File

@@ -0,0 +1,55 @@
package tui
import (
"github.com/charmbracelet/lipgloss"
)
func (m Model) BuildBreadcrumbs() string {
// Only show breadcrumbs in cart view
if !m.ViewingCart {
return ""
}
activeStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color("#FFFFFF")).
Bold(true)
inactiveStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color("#666666"))
sepStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color("#666666"))
sep := sepStyle.Render(" / ")
// Checkout flow steps
labels := []string{"cart", "shipping", "payment", "confirmation"}
// Get current checkout step from model
currentStep := m.CheckoutStep
var items []string
for i, label := range labels {
if i == currentStep {
items = append(items, activeStyle.Render(label))
} else {
items = append(items, inactiveStyle.Render(label))
}
// Add separator except after last item
if i < len(labels)-1 {
items = append(items, sep)
}
}
breadcrumbsContainer := lipgloss.NewStyle().
MarginBottom(1).
PaddingLeft(4)
result := ""
for _, item := range items {
result += item
}
return breadcrumbsContainer.Render(result)
}