printMascot prints the mascot with status
()
| 128 | |
| 129 | // printMascot prints the mascot with status |
| 130 | func (ui *SimpleBuildUI) printMascot() { |
| 131 | ui.mu.Lock() |
| 132 | defer ui.mu.Unlock() |
| 133 | |
| 134 | fmt.Println() |
| 135 | |
| 136 | // Separator |
| 137 | separatorStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("#45475A")) |
| 138 | fmt.Println(separatorStyle.Render(strings.Repeat("─", 60))) |
| 139 | |
| 140 | // Get mascot frame |
| 141 | frame := ui.mascot.Render() |
| 142 | |
| 143 | // Status lines |
| 144 | statusLines := ui.getStatusLines() |
| 145 | |
| 146 | // Print side by side |
| 147 | maxLines := len(frame) |
| 148 | if len(statusLines) > maxLines { |
| 149 | maxLines = len(statusLines) |
| 150 | } |
| 151 | |
| 152 | for i := 0; i < maxLines; i++ { |
| 153 | mascotLine := "" |
| 154 | if i < len(frame) { |
| 155 | mascotLine = ui.colorScheme.ApplyBodyColor(frame[i]) |
| 156 | } else { |
| 157 | mascotLine = strings.Repeat(" ", 22) // Mascot width |
| 158 | } |
| 159 | |
| 160 | statusLine := "" |
| 161 | if i < len(statusLines) { |
| 162 | statusLine = " " + statusLines[i] |
| 163 | } |
| 164 | |
| 165 | fmt.Printf("%s%s\n", mascotLine, statusLine) |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | func (ui *SimpleBuildUI) getStatusLines() []string { |
| 170 | var lines []string |
no test coverage detected