Private
Public Access
1
0

Clean up tui View handling

This commit is contained in:
2024-05-30 07:04:55 +00:00
parent c1792f27ff
commit ed784bb1cf
4 changed files with 78 additions and 57 deletions

View File

@@ -12,17 +12,14 @@ type Values struct {
type State struct {
Ctx *lmcli.Context
Values *Values
Views *Views
Width int
Height int
Err error
}
// this struct holds the final rendered content of various UI components, and
// gets populated in the application's Update() method. View() simply composes
// these elements into the final output
// TODO: consider removing this, let each view be responsible
type Views struct {
// a convenience struct for holding rendered content for indiviudal UI
// elements
type Sections struct {
Header string
Content string
Error string