Skip to content

Commit b5abdb7

Browse files
authored
convert from jsonforms to formik (#72)
* convert from jsonforms to formik
1 parent 010f0ff commit b5abdb7

21 files changed

+1134
-948
lines changed

web-conexs-client/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
"@emotion/react": "^11.14.0",
1717
"@emotion/styled": "^11.14.0",
1818
"@h5web/lib": "^13.0.0",
19-
"@jsonforms/core": "^3.5.1",
20-
"@jsonforms/material-renderers": "^3.5.1",
21-
"@jsonforms/react": "^3.5.1",
2219
"@mui/icons-material": "^6.4.2",
2320
"@mui/material": "^6.4.2",
2421
"@react-three/fiber": "8",
2522
"@tanstack/react-query": "^5.75.1",
2623
"axios": "^1.7.9",
24+
"formik": "^2.4.9",
2725
"molstar": "^5.0.0",
2826
"ndarray": "^1.0.19",
2927
"react": "^18.3.1",

web-conexs-client/pnpm-lock.yaml

Lines changed: 53 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web-conexs-client/src/components/ConvertFromCif.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,13 @@ export default function ConvertFromCif(props: {
7474

7575
return (
7676
<Card>
77-
<Stack>
78-
<Typography>{title}</Typography>
77+
<Stack margin="5px">
78+
<Typography variant="subtitle1">{title}</Typography>
79+
{!props.isFractional && (
80+
<Typography variant="subtitle2" sx={{ fontStyle: "italic" }}>
81+
Only suitable for molecular crystals
82+
</Typography>
83+
)}
7984
<Stack direction="row" spacing="5px" margin="5px">
8085
<Button
8186
variant="contained"

web-conexs-client/src/components/StateIconButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ export interface StateIconButtonProps extends ButtonProps {
1111
export default function StateIconButton(props: StateIconButtonProps) {
1212
const { state, resetState, ...buttonProps } = props;
1313

14-
if (props.state == "running") {
14+
if (state == "running") {
1515
buttonProps.endIcon = <CircularProgress size="1em" />;
1616
} else if (props.state == "error") {
1717
buttonProps.endIcon = <ErrorIcon />;
18-
setTimeout(() => props.resetState(), 2000);
19-
} else if (props.state == "ok") {
18+
setTimeout(() => resetState(), 2000);
19+
} else if (state == "ok") {
2020
buttonProps.endIcon = <CheckCircleIcon />;
2121
setTimeout(() => props.resetState(), 2000);
2222
}

web-conexs-client/src/components/WelcomePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function WelcomePage() {
4545
alignItems: "center",
4646
}}
4747
>
48-
<Typography variant="h6" padding="16px" fontStyle="italic">
48+
<Typography variant="h6" padding="16px" fontStyle="">
4949
A platform for your first steps in theoretical x-ray spectroscopy.
5050
</Typography>
5151
<Typography>

web-conexs-client/src/components/crystals/CreateCrystalPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default function CreateCystalPage() {
8282
endIcon={<PublishIcon />}
8383
resetState={resetState}
8484
state={state}
85-
disabled={disabled}
85+
disabled={crystal == null || disabled}
8686
variant="contained"
8787
onClick={() => {
8888
setDisabled(true);

0 commit comments

Comments
 (0)