()
| 1416 | } |
| 1417 | |
| 1418 | func (v *PricingView) renderHelp() string { |
| 1419 | var text string |
| 1420 | switch v.ActiveSection { |
| 1421 | case PricingSectionHeader: |
| 1422 | text = styleHelpKey("[↔]") + " Switch View " + styleHelpKey("[↓]") + " Command " + styleHelpKey("[F3]") + " Refresh " + styleHelpKey("[Esc]") + " Quit" |
| 1423 | case PricingSectionCommand: |
| 1424 | if v.BuilderFocus == BuilderFocusField { |
| 1425 | text = styleHelpKey("[↔]") + " Switch Field " + styleHelpKey("[Tab]") + " Complete " + styleHelpKey("[Enter]") + " Submit " + styleHelpKey("[F2]") + " Reset " + styleHelpKey("[F3]") + " Refresh" |
| 1426 | } else { |
| 1427 | text = styleHelpKey("[↑↓↔]") + " Navigate " + styleHelpKey("[Space]") + " Select " + styleHelpKey("[Enter]") + " Submit" |
| 1428 | } |
| 1429 | case PricingSectionResults: |
| 1430 | text = styleHelpKey("[j/k]") + " Scroll " + styleHelpKey("[↔]") + " H-Scroll " + styleHelpKey("[↑]") + " Command " + styleHelpKey("[Esc]") + " Quit" |
| 1431 | } |
| 1432 | helpTitle := lipgloss.NewStyle().Foreground(colorDarkGray).Render("Help") |
| 1433 | return boxWithTitle(helpTitle, text, colorDarkGray, v.Width) |
| 1434 | } |
| 1435 | |
| 1436 | func styleHelpKey(k string) string { |
| 1437 | return lipgloss.NewStyle().Foreground(colorCyan).Render(k) |
no test coverage detected