diff --git a/resources/scripts/components/server/Console.tsx b/resources/scripts/components/server/Console.tsx index f30d35a6..0eca83d1 100644 --- a/resources/scripts/components/server/Console.tsx +++ b/resources/scripts/components/server/Console.tsx @@ -2,6 +2,8 @@ import React, { createRef, useEffect, useRef } from 'react'; import { Terminal } from 'xterm'; import * as TerminalFit from 'xterm/lib/addons/fit/fit'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; +import { State, useStoreState } from 'easy-peasy'; +import { ApplicationState } from '@/state/types'; const theme = { background: 'transparent', @@ -25,8 +27,9 @@ const theme = { }; export default () => { - const ref = createRef(); + const connected = useStoreState((state: State) => state.server.socket.connected); + const ref = createRef(); const terminal = useRef(new Terminal({ disableStdin: true, cursorStyle: 'underline', @@ -50,7 +53,7 @@ export default () => { return (
- +
( -
-
- +export default () => { + const status = useStoreState((state: State) => state.server.status); + + return ( +
+
+ +
+
+

Current status: {status}

+
-
-

Testing

-
-
-); + ); +};