Merge branch 'develop' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-03-21 15:49:41 -06:00
commit 49de31bf4c
24 changed files with 169 additions and 32 deletions

View file

@ -146,10 +146,10 @@ export default () => {
// Add support for capturing keys
terminal.attachCustomKeyEventHandler((e: KeyboardEvent) => {
if (e.metaKey && e.key === 'c') {
if ((e.ctrlKey || e.metaKey) && e.key === 'c') {
document.execCommand('copy');
return false;
} else if (e.metaKey && e.key === 'f') {
} else if ((e.ctrlKey || e.metaKey) && e.key === 'f') {
e.preventDefault();
searchBar.show();
return false;

View file

@ -25,6 +25,7 @@ export default ({ backup }: Props) => {
const setServerFromState = ServerContext.useStoreActions(actions => actions.server.setServerFromState);
const [ modal, setModal ] = useState('');
const [ loading, setLoading ] = useState(false);
const [ truncate, setTruncate ] = useState(false);
const { clearFlashes, clearAndAddHttpError } = useFlash();
const { mutate } = getServerBackups();
@ -62,7 +63,7 @@ export default ({ backup }: Props) => {
const doRestorationAction = () => {
setLoading(true);
clearFlashes('backups');
restoreServerBackup(uuid, backup.uuid)
restoreServerBackup(uuid, backup.uuid, truncate)
.then(() => setServerFromState(s => ({
...s,
status: 'restoring_backup',
@ -108,6 +109,8 @@ export default ({ backup }: Props) => {
css={tw`text-red-500! w-5! h-5! mr-2`}
id={'restore_truncate'}
value={'true'}
checked={truncate}
onChange={() => setTruncate(s => !s)}
/>
Remove all files and folders before restoring this backup.
</label>

View file

@ -78,7 +78,7 @@ const StartupContainer = () => {
/>
:
<ServerContentBlock title={'Startup Settings'} showFlashKey={'startup:image'}>
<div css={tw`flex`}>
<div css={tw`md:flex`}>
<TitledGreyBox title={'Startup Command'} css={tw`flex-1`}>
<div css={tw`px-1 py-2`}>
<p css={tw`font-mono bg-neutral-900 rounded py-2 px-4`}>
@ -86,7 +86,7 @@ const StartupContainer = () => {
</p>
</div>
</TitledGreyBox>
<TitledGreyBox title={'Docker Image'} css={tw`flex-1 lg:flex-none lg:w-1/3 ml-10`}>
<TitledGreyBox title={'Docker Image'} css={tw`flex-1 lg:flex-none lg:w-1/3 mt-8 md:mt-0 md:ml-10`}>
{data.dockerImages.length > 1 && !isCustomImage ?
<>
<InputSpinner visible={loading}>