Push: Initial push
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Package app wires together the Nebara OS TUI application.
|
||||
package app
|
||||
|
||||
import (
|
||||
"github.com/nebara/nebara-os/internal/mock"
|
||||
"github.com/nebara/nebara-os/internal/model"
|
||||
"github.com/nebara/nebara-os/internal/ui/navigation"
|
||||
)
|
||||
|
||||
// State holds the complete runtime state of the TUI application.
|
||||
type State struct {
|
||||
Appliance model.ApplianceInfo
|
||||
Message *model.SystemMessage
|
||||
Navigator *navigation.Navigator
|
||||
ShowModal bool
|
||||
ModalLabel string
|
||||
ShowHelp bool
|
||||
}
|
||||
|
||||
// NewStateFromMock constructs application state from a mock scenario.
|
||||
func NewStateFromMock(s mock.State) *State {
|
||||
nav := navigation.NewNavigator(model.MainMenu(), s.InitialMenu)
|
||||
return &State{
|
||||
Appliance: s.Appliance,
|
||||
Message: s.Message,
|
||||
Navigator: nav,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user