@@ -1,90 +0,0 @@
8− tea "github.com/charmbracelet/bubbletea/v2"
9− anim "github.com/charmbracelet/crush/internal/tui/components/anim"
10− "github.com/charmbracelet/crush/internal/tui/styles"
11− "github.com/charmbracelet/lipgloss/v2"
21−func (m model) Init() tea.Cmd {
25−func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
26− switch msg := msg.(type) {
27− case tea.WindowSizeMsg:
28− m.w, m.h = msg.Width, msg.Height
31− switch msg.String() {
40− m.anim, cmd = m.anim.Update(msg)
47−func (m model) View() tea.View {
48− if m.w == 0 || m.h == 0 {
49− return tea.NewView("")
53− v.BackgroundColor = m.bgColor
59− if a, ok := m.anim.(*anim.Anim); ok {
60− l := lipgloss.NewLayer(a.View()).
62− X(m.w/2 - a.Width()/2).
65− v = tea.NewView(lipgloss.NewCanvas(l))
66− v.BackgroundColor = m.bgColor
73− t := styles.CurrentTheme()
74− p := tea.NewProgram(model{
76− anim: anim.New(anim.Settings{
79− LabelColor: t.FgBase,
80− GradColorA: t.Primary,
81− GradColorB: t.Secondary,
84− }, tea.WithAltScreen())
86− if _, err := p.Run(); err != nil {
87− fmt.Fprintf(os.Stderr, "Uh oh: %v\n", err)