Skip to content
Snippets Groups Projects

webui: String input now shows link to ALT docs

Merged Tomáš Pecka requested to merge staging into master
1 file
+ 29
14
Compare changes
  • Side-by-side
  • Inline
@@ -14,9 +14,12 @@ import {
Select,
MenuItem,
InputLabel,
FormControl
FormControl,
Link,
Grid,
} from '@material-ui/core'
import CloseIcon from '@material-ui/icons/Close'
import HelpIcon from '@material-ui/icons/Help';
import { ReduxState } from '../../../reducers'
import { algorithmUIActions } from '../../../reducers/algorithmUI'
import { algorithmDataActions } from '../../../reducers/algorithmData'
@@ -44,7 +47,6 @@ const useStyles = makeStyles({
height: '100%'
},
typeSelectFormControl: {
width: '15%',
marginBottom: '20px'
},
dialogContent: {
@@ -202,18 +204,31 @@ const InputDialog = () => {
</DialogTitle>
<Divider />
<DialogContent className={classes.dialogContent}>
<FormControl className={classes.typeSelectFormControl}>
<InputLabel id="typeSelectLabel">Type</InputLabel>
<Select
labelId="typeSelectLabel"
value={type}
onChange={handleTypeChange}
>
<MenuItem value="string">String</MenuItem>
<MenuItem value="number">Number</MenuItem>
<MenuItem value="boolean">Bool</MenuItem>
</Select>
</FormControl>
<Grid container justify="center" spacing={2}>
<Grid item xs={6}>
<FormControl className={classes.typeSelectFormControl}>
<InputLabel id="typeSelectLabel">Type</InputLabel>
<Select
labelId="typeSelectLabel"
value={type}
onChange={handleTypeChange}
>
<MenuItem value="string">String</MenuItem>
<MenuItem value="number">Number</MenuItem>
<MenuItem value="boolean">Bool</MenuItem>
</Select>
</FormControl>
</Grid>
<Grid item xs={6}>
{type === "string" && (
<Link component="button" variant="body2" target="_blank" href="https://alt.fit.cvut.cz/docs/parse/" onClick={()=> window.open("https://alt.fit.cvut.cz/docs/parse/", "_blank")}>
<IconButton disabled={true}><HelpIcon /></IconButton>
String format documentation
</Link>
)}
</Grid>
</Grid>
{type === 'string' && (
<TextField
className={classes.textField}
Loading