diff --git a/resources/scripts/components/auth/LoginCheckpointContainer.tsx b/resources/scripts/components/auth/LoginCheckpointContainer.tsx index 7c474a3fe..d8515c587 100644 --- a/resources/scripts/components/auth/LoginCheckpointContainer.tsx +++ b/resources/scripts/components/auth/LoginCheckpointContainer.tsx @@ -8,6 +8,27 @@ import { StaticContext } from 'react-router'; import FlashMessageRender from '@/components/FlashMessageRender'; import { ApplicationStore } from '@/state'; import Spinner from '@/components/elements/Spinner'; +import styled from 'styled-components'; +import { breakpoint } from 'styled-components-breakpoint'; + +const Container = styled.div` + ${breakpoint('sm')` + ${tw`w-4/5 mx-auto`} + `}; + + ${breakpoint('md')` + ${tw`p-10`} + `}; + + ${breakpoint('lg')` + ${tw`w-3/5`} + `}; + + ${breakpoint('xl')` + ${tw`w-full`} + max-width: 660px; + `}; +`; export default ({ history, location: { state } }: RouteComponentProps<{}, StaticContext, { token?: string }>) => { const [ code, setCode ] = useState(''); @@ -52,41 +73,43 @@ export default ({ history, location: { state } }: RouteComponentProps<{}, Static

Device Checkpoint

- - -
- - -
-
- -
-
- - Return to Login - -
-
+ + + +
+ + +
+
+ +
+
+ + Return to Login + +
+
+
); }; diff --git a/resources/scripts/components/server/Console.tsx b/resources/scripts/components/server/Console.tsx index 5f659be88..099943fe9 100644 --- a/resources/scripts/components/server/Console.tsx +++ b/resources/scripts/components/server/Console.tsx @@ -81,6 +81,17 @@ export default () => { // @see https://github.com/xtermjs/xterm.js/issues/2265 // @see https://github.com/xtermjs/xterm.js/issues/2230 TerminalFit.fit(terminal); + + // Add support for copying terminal text. + terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => { + // Ctrl + C + if (e.ctrlKey && (e.key === 'c')) { + document.execCommand('copy'); + return false; + } + + return true; + }); } }, [ terminal, connected, terminalElement ]);