Merge branch 'develop' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-02-24 17:30:18 -07:00
commit b8788d1af1
10 changed files with 179 additions and 33 deletions

View file

@ -145,23 +145,16 @@ export default () => {
// Add support for capturing keys
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
// Ctrl + C (Copy)
if (e.ctrlKey && e.key === 'c') {
if (e.metaKey && e.key === 'c') {
document.execCommand('copy');
return false;
}
// Ctrl + F (Find)
if (e.ctrlKey && e.key === 'f') {
} else if (e.metaKey && e.key === 'f') {
e.preventDefault();
searchBar.show();
return false;
}
// Escape
if (e.key === 'Escape') {
} else if (e.key === 'Escape') {
searchBar.hidden();
}
return true;
});
}
@ -213,10 +206,7 @@ export default () => {
tw`rounded-t p-2 bg-black w-full`,
!canSendCommands && tw`rounded-b`,
]}
style={{
minHeight: '16rem',
maxHeight: '32rem',
}}
style={{ minHeight: '16rem' }}
>
<TerminalDiv id={'terminal'} ref={ref}/>
</div>

View file

@ -31,6 +31,7 @@ import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
import RequireServerPermission from '@/hoc/RequireServerPermission';
import ServerInstallSvg from '@/assets/images/server_installing.svg';
import ServerRestoreSvg from '@/assets/images/server_restore.svg';
import ServerErrorSvg from '@/assets/images/server_error.svg';
const ConflictStateRenderer = () => {
const status = ServerContext.useStoreState(state => state.server.data?.status || null);
@ -44,11 +45,18 @@ const ConflictStateRenderer = () => {
message={'Your server should be ready soon, please try again in a few minutes.'}
/>
:
<ScreenBlock
title={isTransferring ? 'Transferring' : 'Restoring from Backup'}
image={ServerRestoreSvg}
message={isTransferring ? 'Your server is being transfered to a new node, please check back later.' : 'Your server is currently being restored from a backup, please check back in a few minutes.'}
/>
status === 'suspended' ?
<ScreenBlock
title={'Server Suspended'}
image={ServerErrorSvg}
message={'This server is suspended and cannot be accessed.'}
/>
:
<ScreenBlock
title={isTransferring ? 'Transferring' : 'Restoring from Backup'}
image={ServerRestoreSvg}
message={isTransferring ? 'Your server is being transfered to a new node, please check back later.' : 'Your server is currently being restored from a backup, please check back in a few minutes.'}
/>
);
};