diff --git a/plugin/src/App/StatusPages/NotConnected.lua b/plugin/src/App/StatusPages/NotConnected.lua index 109884246..083f22c2d 100644 --- a/plugin/src/App/StatusPages/NotConnected.lua +++ b/plugin/src/App/StatusPages/NotConnected.lua @@ -14,6 +14,8 @@ local PORT_WIDTH = 74 local DIVIDER_WIDTH = 1 local HOST_OFFSET = 12 +local lastHost, lastPort + local e = Roact.createElement local function AddressEntry(props) @@ -24,7 +26,7 @@ local function AddressEntry(props) layoutOrder = props.layoutOrder, }, { Host = e("TextBox", { - Text = "", + Text = lastHost or "", Font = Enum.Font.Code, TextSize = 18, TextColor3 = theme.AddressEntry.TextColor, @@ -43,7 +45,7 @@ local function AddressEntry(props) }), Port = e("TextBox", { - Text = "", + Text = lastPort or "", Font = Enum.Font.Code, TextSize = 18, TextColor3 = theme.AddressEntry.TextColor, @@ -121,6 +123,9 @@ function NotConnectedPage:render() local hostText = self.hostRef.current.Text local portText = self.portRef.current.Text + lastHost = hostText + lastPort = portText + self.props.onConnect( #hostText > 0 and hostText or Config.defaultHost, #portText > 0 and portText or Config.defaultPort