Fixed issues in app creator

This commit is contained in:
frikky
2021-11-24 18:57:01 +01:00
parent 47b02dec89
commit 7c641b918e
+24 -3
View File
@@ -2194,7 +2194,7 @@ const AppCreator = (props) => {
const extraKeys = ( const extraKeys = (
<div style={{ marginTop: 50 }}> <div style={{ marginTop: 50 }}>
<div style={{ display: "flex" }}> <div style={{ display: "flex" }}>
<Typography variant="body1">Extra configuration items</Typography> <Typography variant="body1">Extra authentication</Typography>
{extraAuth.length === 0 ? ( {extraAuth.length === 0 ? (
<Button <Button
color="primary" color="primary"
@@ -3119,6 +3119,15 @@ const AppCreator = (props) => {
<Dialog <Dialog
open={actionsModalOpen} open={actionsModalOpen}
fullWidth fullWidth
PaperProps={{
style: {
backgroundColor: surfaceColor,
color: "white",
minWidth: 500,
maxWidth: 500,
maxHeight: 800,
},
}}
onClose={() => { onClose={() => {
setUrlPath(""); setUrlPath("");
setCurrentAction({ setCurrentAction({
@@ -3430,6 +3439,14 @@ const AppCreator = (props) => {
} }
} }
if (baseUrl !== undefined && baseUrl !== null && parsedurl.startsWith(baseUrl)) {
parsedurl = parsedurl.replaceAll(baseUrl, "");
}
if (parsedurl.includes("?")) {
parsedurl = parsedurl.split("?")[0]
}
if (event.target.value !== parsedurl) { if (event.target.value !== parsedurl) {
setUrlPath(parsedurl); setUrlPath(parsedurl);
setActionField("url", parsedurl); setActionField("url", parsedurl);
@@ -4701,6 +4718,7 @@ const AppCreator = (props) => {
type="name" type="name"
id="outlined-with-placeholder" id="outlined-with-placeholder"
margin="normal" margin="normal"
multiline
variant="outlined" variant="outlined"
placeholder="A description for the service" placeholder="A description for the service"
value={description} value={description}
@@ -4779,8 +4797,9 @@ const AppCreator = (props) => {
setBaseUrl(tmpstring); setBaseUrl(tmpstring);
}} }}
/> />
<FormControl style={{ marginTop: 30 }} variant="outlined"> <div style={{padding: 25, border: "2px solid rgba(255,255,255,0.7)", borderRadius: theme.palette.borderRadius, }}>
<Typography variant="body1">Authentication type</Typography> <FormControl style={{ }} variant="outlined">
<Typography variant="h6">Authentication</Typography>
<Select <Select
fullWidth fullWidth
onChange={(e) => { onChange={(e) => {
@@ -4809,12 +4828,14 @@ const AppCreator = (props) => {
))} ))}
</Select> </Select>
</FormControl> </FormControl>
<div style={{marginTop: 15 }} />
{basicAuth} {basicAuth}
{bearerAuth} {bearerAuth}
{apiKey} {apiKey}
{oauth2Auth} {oauth2Auth}
{jwtAuth} {jwtAuth}
{extraKeys} {extraKeys}
</div>
{/*authenticationOption === "No authentication" ? null : {/*authenticationOption === "No authentication" ? null :
<FormControlLabel <FormControlLabel