MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / renderHelp

Method renderHelp

internal/tui/views/pricing.go:1418–1434  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1416}
1417
1418func (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
1436func styleHelpKey(k string) string {
1437 return lipgloss.NewStyle().Foreground(colorCyan).Render(k)

Callers 1

RenderMethod · 0.95

Calls 3

styleHelpKeyFunction · 0.85
boxWithTitleFunction · 0.85
RenderMethod · 0.45

Tested by

no test coverage detected