WIP: working on adding inputbox and wrapping the messages in a viewport

This commit is contained in:
2021-12-13 09:38:07 +02:00
parent c3f75c2a43
commit f56048fbf7
8 changed files with 128 additions and 9 deletions
+4
View File
@@ -59,6 +59,7 @@ func initialUiState() UI {
return UI{
login: login.NewLogin(),
mainScreen: mainscreen.NewMainScreen(),
windowWidth: width,
windowHeight: height,
}
@@ -100,6 +101,9 @@ func (s State) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
Width(msg.Width).
Height(msg.Height)
s.ui.mainScreen.Viewport.Width = msg.Width
s.ui.mainScreen.Viewport.Height = msg.Height - mainscreen.InputBoxHeight
return s, nil
case login.ConnectingMsg:
host := s.ui.login.Inputs[0].Value()