Skip to content

Commit c036eee

Browse files
committed
Style success checkmark in status command output
1 parent f40073a commit c036eee

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

internal/ui/app.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,19 @@ func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
251251
a.lines = appendLine(a.lines, blank)
252252
}
253253
return a, nil
254+
case output.InstanceInfoEvent:
255+
if line, ok := output.FormatEventLine(msg); ok {
256+
line = strings.Replace(line, output.SuccessMarker(), styles.Success.Render(output.SuccessMarker()), 1)
257+
for _, part := range strings.Split(line, "\n") {
258+
l := styledLine{text: part}
259+
if a.spinner.PendingStop() {
260+
a.bufferedLines = appendLine(a.bufferedLines, l)
261+
} else {
262+
a.lines = appendLine(a.lines, l)
263+
}
264+
}
265+
}
266+
return a, nil
254267
default:
255268
if line, ok := output.FormatEventLine(msg); ok {
256269
for _, part := range strings.Split(line, "\n") {

0 commit comments

Comments
 (0)