in tui/components.go [143:182]
func (e errorAlert) Render() string {
sb := strings.Builder{}
height := len(e.err.Error()) / width
style := errorAlertStyle.Copy()
style.Height(height)
sb.WriteString("\n")
sb.WriteString(boldAlert.Render("There was an error!"))
sb.WriteString("\n")
if e.err.usermsg != "" {
sb.WriteString(e.err.usermsg)
sb.WriteString("\n")
}
sb.WriteString("\n")
sb.WriteString("Details: \n")
sb.WriteString(e.err.Error())
sb.WriteString("\n")
sb.WriteString("\n")
if !e.err.quit {
sb.WriteString("You can exit the program by typing ")
sb.WriteString(cmdStyle.Render("ctr+c."))
}
if e.err.target != "" {
text := " Press the Enter Key to go back and change choice "
if e.err.target == "quit" {
text = " Press the Enter Key exit "
}
sb.WriteString("\n")
sb.WriteString("\n")
sb.WriteString(bodyStyle.Render(promptStyle.Render(text)))
sb.WriteString("\n")
}
return style.Render(sb.String())
}