renderJobInfoBox renders job information in a styled box for interactive sync mode
(name string, schedule string, command string, monitored bool)
| 684 | |
| 685 | // renderJobInfoBox renders job information in a styled box for interactive sync mode |
| 686 | func renderJobInfoBox(name string, schedule string, command string, monitored bool) string { |
| 687 | // Define styles - use full terminal width minus margin |
| 688 | boxStyle := lipgloss.NewStyle(). |
| 689 | Border(lipgloss.RoundedBorder()). |
| 690 | BorderForeground(lipgloss.Color("240")). |
| 691 | Padding(0, 1). |
| 692 | MarginLeft(2). |
| 693 | Width(100) |
| 694 | |
| 695 | nameStyle := lipgloss.NewStyle(). |
| 696 | Bold(true). |
| 697 | Foreground(lipgloss.Color("15")) // Bright white - readable on blue PowerShell backgrounds |
| 698 | |
| 699 | labelStyle := lipgloss.NewStyle(). |
| 700 | Foreground(lipgloss.Color("245")). |
| 701 | Width(12) |
| 702 | |
| 703 | yesStyle := lipgloss.NewStyle(). |
| 704 | Foreground(lipgloss.Color("10")) // Green |
| 705 | |
| 706 | noStyle := lipgloss.NewStyle(). |
| 707 | Foreground(lipgloss.Color("245")) // Gray |
| 708 | |
| 709 | // Build content lines |
| 710 | var lines []string |
| 711 | |
| 712 | lines = append(lines, nameStyle.Render(name)) |
| 713 | lines = append(lines, "") |
| 714 | |
| 715 | if schedule != "" { |
| 716 | lines = append(lines, labelStyle.Render("Schedule:")+" "+schedule) |
| 717 | } |
| 718 | |
| 719 | // Show full command - box width will accommodate long names/commands |
| 720 | lines = append(lines, labelStyle.Render("Command:")+" "+command) |
| 721 | |
| 722 | // Show monitoring status |
| 723 | monitoredStr := noStyle.Render("No") |
| 724 | if monitored { |
| 725 | monitoredStr = yesStyle.Render("Yes") |
| 726 | } |
| 727 | lines = append(lines, labelStyle.Render("Monitored:")+" "+monitoredStr) |
| 728 | |
| 729 | content := strings.Join(lines, "\n") |
| 730 | return boxStyle.Render(content) |
| 731 | } |
| 732 | |
| 733 | type nameInputModel struct { |
| 734 | list list.Model |
no test coverage detected