renderGHError renders the GH CLI error dialog.
(modalWidth int)
| 356 | |
| 357 | // renderGHError renders the GH CLI error dialog. |
| 358 | func (s *SettingsOverlay) renderGHError(modalWidth int) string { |
| 359 | var result strings.Builder |
| 360 | |
| 361 | errorHeaderStyle := lipgloss.NewStyle(). |
| 362 | Bold(true). |
| 363 | Foreground(ErrorColor). |
| 364 | Padding(0, 1) |
| 365 | errorMsgStyle := lipgloss.NewStyle(). |
| 366 | Foreground(TextColor). |
| 367 | Padding(0, 1) |
| 368 | |
| 369 | result.WriteString(errorHeaderStyle.Render("GitHub CLI Error")) |
| 370 | result.WriteString("\n\n") |
| 371 | result.WriteString(errorMsgStyle.Render(s.ghError)) |
| 372 | result.WriteString("\n\n") |
| 373 | |
| 374 | hintStyle := lipgloss.NewStyle(). |
| 375 | Foreground(MutedColor). |
| 376 | Padding(0, 1) |
| 377 | result.WriteString(hintStyle.Render(fmt.Sprintf("Install: https://cli.github.com"))) |
| 378 | result.WriteString("\n") |
| 379 | result.WriteString(hintStyle.Render("PR creation has been disabled.")) |
| 380 | |
| 381 | _ = modalWidth |
| 382 | return result.String() |
| 383 | } |