Building the main model

This commit is contained in:
Leon Mika 2022-03-27 22:23:28 +00:00 committed by GitHub
parent 6ab8a3ef44
commit 7a5584cf9a
3 changed files with 348 additions and 298 deletions

View file

@ -21,9 +21,6 @@ import (
"github.com/lmika/awstools/internal/dynamo-browse/services/tables"
"github.com/lmika/awstools/internal/dynamo-browse/ui"
"github.com/lmika/awstools/internal/dynamo-browse/ui/teamodels"
"github.com/lmika/awstools/internal/dynamo-browse/ui/teamodels/dynamoitemview"
"github.com/lmika/awstools/internal/dynamo-browse/ui/teamodels/dynamotableview"
"github.com/lmika/awstools/internal/dynamo-browse/ui/teamodels/layout"
"github.com/lmika/awstools/internal/dynamo-browse/ui/teamodels/modal"
"github.com/lmika/awstools/internal/dynamo-browse/ui/teamodels/statusandprompt"
"github.com/lmika/awstools/internal/dynamo-browse/ui/teamodels/tableselect"
@ -71,21 +68,27 @@ func main() {
"dup": tableWriteController.Duplicate(),
})
uiModel := ui.NewModel(uiDispatcher, commandController, tableReadController, tableWriteController)
_ = uiDispatcher
_ = commandController
// uiModel := ui.NewModel(uiDispatcher, commandController, tableReadController, tableWriteController)
// TEMP
_ = uiModel
// _ = uiModel
// END TEMP
var model tea.Model = statusandprompt.New(
layout.NewVBox(
layout.LastChildFixedAt(11),
dynamotableview.New(tableReadController),
dynamoitemview.New(),
),
"Hello world",
)
model = layout.FullScreen(tableselect.New(model))
/*
var model tea.Model = statusandprompt.New(
layout.NewVBox(
layout.LastChildFixedAt(11),
dynamotableview.New(tableReadController),
dynamoitemview.New(),
),
"Hello world",
)
model = layout.FullScreen(tableselect.New(model))
*/
model := ui.NewModel(tableReadController)
// Pre-determine if layout has dark background. This prevents calls for creating a list to hang.
lipgloss.HasDarkBackground()