minor text changes

This commit is contained in:
proddy
2020-07-07 23:23:16 +02:00
parent 5ca01d562a
commit bfeb9f4e86
10 changed files with 60 additions and 48 deletions

View File

@@ -23,7 +23,7 @@ const FullScreenLoading = () => {
<div className={classes.fullScreenLoading}>
<CircularProgress className={classes.progress} size={100} />
<Typography variant="h4">
Loading &hellip;
Loading&hellip;
</Typography>
</div>
)

View File

@@ -84,11 +84,11 @@ export function restController<D, P extends RestControllerProps<D>>(endpointUrl:
}
throw Error("Invalid status code: " + response.status);
}).then(json => {
this.props.enqueueSnackbar("Changes successfully applied.", { variant: 'success' });
this.props.enqueueSnackbar("Update successful.", { variant: 'success' });
this.setState({ data: json, loading: false });
}).catch(error => {
const errorMessage = error.message || "Unknown error";
this.props.enqueueSnackbar("Problem saving: " + errorMessage, { variant: 'error' });
this.props.enqueueSnackbar("Problem updating: " + errorMessage, { variant: 'error' });
this.setState({ data: undefined, loading: false, errorMessage });
});
}

View File

@@ -5,7 +5,6 @@ import { makeStyles, createStyles } from '@material-ui/styles';
import CloudUploadIcon from '@material-ui/icons/CloudUpload';
import CancelIcon from '@material-ui/icons/Cancel';
import { Theme, Box, Typography, LinearProgress, Button } from '@material-ui/core';
import ErrorButton from './ErrorButton';
interface SingleUploadStyleProps extends DropzoneState {
uploading: boolean;
@@ -84,9 +83,9 @@ const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, accept, uploadi
<Box width="100%" p={2}>
{renderProgress(progress)}
</Box>
<ErrorButton startIcon={<CancelIcon />} variant="contained" color="primary" onClick={onCancel}>
<Button startIcon={<CancelIcon />} variant="contained" color="secondary" onClick={onCancel}>
Cancel
</ErrorButton>
</Button>
</Fragment>
)}
</Box>