diff --git a/src/client/components/common/CondaSelectionDialog.js b/src/client/components/common/CondaSelectionDialog.js index 5085aab2..79e838d4 100644 --- a/src/client/components/common/CondaSelectionDialog.js +++ b/src/client/components/common/CondaSelectionDialog.js @@ -1,9 +1,9 @@ import React from "react"; -import {Box, Button, IconButton, Paper, Typography} from "@mui/material"; +import { Button, Typography, Stack} from "@mui/material"; import {messageTypes} from "../../../messageTypes"; import vars from "../../assets/styles/variables"; -import {CloseModalIcon} from "../views/visualiseView/icons/layoutIcons"; import {CustomSelect} from "./CustomSelect"; +import {ModalsLayout} from "./ModalsLayout"; const { lightBlack, @@ -11,97 +11,45 @@ const { } = vars; export const CondaSelectionDialog = ({state, setState, getMenuItems}) => { - - return - - + + - - - - - - {'Select conda environment:'} - - setState(val)} getMenuItems={getMenuItems} /> - + {'Select conda environment:'} + + setState(val)} getMenuItems={getMenuItems} /> + - - - - + + ) } diff --git a/src/client/components/common/DependenciesDialog.js b/src/client/components/common/DependenciesDialog.js index 43946501..d7265172 100644 --- a/src/client/components/common/DependenciesDialog.js +++ b/src/client/components/common/DependenciesDialog.js @@ -1,7 +1,8 @@ import React from "react"; -import {Box, Button, Paper, Typography, Stack} from "@mui/material"; +import { Button, Typography, Stack} from "@mui/material"; import {messageTypes} from "../../../messageTypes"; import vars from "../../assets/styles/variables"; +import {ModalsLayout} from "./ModalsLayout"; const { breadcrumbTextColor, @@ -12,70 +13,31 @@ const { } = vars; export const DependenciesDialog = ({state, setState}) => { - return - - - - - We couldn’t find Psyneulink. - - - Psyneulink has not been found on this conda environment. You can switch environment or install Psyneulink on this one. - - + return ( + + + + We couldn’t find Psyneulink. + + + Psyneulink has not been found on this conda environment. You can switch environment or install Psyneulink on this one. + + - + - - - - + + + ) } diff --git a/src/client/components/common/Layout.js b/src/client/components/common/Layout.js index e4b808ed..60b8dade 100644 --- a/src/client/components/common/Layout.js +++ b/src/client/components/common/Layout.js @@ -31,7 +31,7 @@ class Layout extends React.Component { electronState: appStates.FRONTEND_STARTED, condaEnv: '', condaEnvs: undefined, - dependenciesFound: true, + dependenciesFound: false, condaEnvSelection: false, spinnerEnabled: !isFrontendDev, }; diff --git a/src/client/components/common/ModalsLayout.js b/src/client/components/common/ModalsLayout.js new file mode 100644 index 00000000..9d5f66df --- /dev/null +++ b/src/client/components/common/ModalsLayout.js @@ -0,0 +1,66 @@ +import React from "react"; +import {Box, IconButton, Paper} from "@mui/material"; +import {CloseModalIcon} from "../views/visualiseView/icons/layoutIcons"; + +export const ModalsLayout = ({children, hasClosingIcon = false}) => { + + return + + { + hasClosingIcon && + + + } + + + {children} + + + +}