mirror of
https://github.com/IllusionMan1212/gorc.git
synced 2026-10-24 02:12:33 +00:00
WIP: working on adding inputbox and wrapping the messages in a viewport
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user