case "ctrl+c", "ctrl+C":
return m, tea.Quit
- case "enter":
+ case "enter":
m.APIStatus = api.APIStatusMsg{}
m.ReqReceived = false
m.Requested = true
return m, api.HandleAPIStatusRequest(api.StatusUrl)
-
}
case api.APIStatusMsg:
m.Width = w
m.Height = h
return m, nil
-
}
return m, nil
topBarBlock := ui.TopBarStyle.Render(lipgloss.JoinHorizontal(lipgloss.Center,
ui.TopBarLeftStyle.Width((m.Width / 2 ) - 1).Render(roundLabelCorner + titleBlock + labelArrow),
ui.TopBarRightStyle.Width((m.Width / 2 ) - 1).Render(rightTopBarBlock)))
-
_, topBarBlockHeight := lipgloss.Size(topBarBlock)
// Footer
statusResponse)
mainBodyBlockStyle := lipgloss.NewStyle().Height(m.Height - footerBlockHeight - topBarBlockHeight)
-
mainBodyBlock = mainBodyBlockStyle.Render(mainBodyBlock)
-
return lipgloss.PlaceHorizontal(m.Width, lipgloss.Center, lipgloss.JoinVertical(lipgloss.Left, topBarBlock, mainBodyBlock, footerBlock))
}