Skip to content

Commit

Permalink
change icon, used Divider Component
Browse files Browse the repository at this point in the history
  • Loading branch information
sanglevinh committed Dec 25, 2023
1 parent 1e0cc3b commit b27ef37
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { memo, useEffect, useState } from "react"
import { useDispatch, useSelector } from "react-redux"
import { Handle, Position, NodeProps } from "reactflow"

import AccountTreeIcon from "@mui/icons-material/AccountTree"
import FolderIcon from "@mui/icons-material/Folder"
import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutlined"
import { Typography } from "@mui/material"
import { IconButton, Typography } from "@mui/material"
import Button from "@mui/material/Button"
import Dialog from "@mui/material/Dialog"
import DialogActions from "@mui/material/DialogActions"
Expand Down Expand Up @@ -98,9 +99,9 @@ const ItemSelect = memo(function ItemSelect({ nodeId }: NodeIdProps) {

return (
<>
<Button variant="outlined" size="small" onClick={() => setOpen(true)}>
{"Structure"}
</Button>
<IconButton onClick={() => setOpen(true)}>
<AccountTreeIcon color={"primary"} />
</IconButton>
<Typography className="selectFilePath" variant="caption">
{structureFileName ? structureFileName : "No structure is selected."}
</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ import { memo, useEffect, useState } from "react"
import { useDispatch, useSelector } from "react-redux"
import { Handle, Position, NodeProps } from "reactflow"

import AccountTreeIcon from "@mui/icons-material/AccountTree"
import FolderIcon from "@mui/icons-material/Folder"
import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutlined"
import { Box, Checkbox, Typography, Tooltip } from "@mui/material"
import {
Box,
Checkbox,
Typography,
Tooltip,
Divider,
IconButton,
} from "@mui/material"
import Button from "@mui/material/Button"
import { CheckboxProps } from "@mui/material/Checkbox"
import Dialog from "@mui/material/Dialog"
Expand Down Expand Up @@ -111,9 +119,9 @@ const ItemSelect = memo(function ItemSelect({ nodeId }: NodeIdProps) {

return (
<>
<Button variant="outlined" size="small" onClick={() => setOpen(true)}>
{"Structure"}
</Button>
<IconButton onClick={() => setOpen(true)}>
<AccountTreeIcon color={"primary"} />
</IconButton>
<Typography className="selectFilePath" variant="caption">
{structureFileName ? structureFileName : "No structure is selected."}
</Typography>
Expand Down Expand Up @@ -177,12 +185,13 @@ const FileTreeView = memo(function FileTreeView({
return (
<div>
{isLoading && <LinearProgress />}
<Box display={"flex"} borderBottom={1}>
<Box display={"flex"} paddingBottom={1}>
<Box flexGrow={4}>Structure</Box>
<Box flexGrow={2}>Type</Box>
<Box flexGrow={3}>Shape</Box>
<Box flexGrow={1}></Box>
</Box>
<Divider />
<TreeView>
{tree?.map((node, i) => (
<TreeNode
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Workspace/FlowChart/TreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const InputNodeComponent = memo(function InputNodeComponent({
break
case FILE_TYPE_SET.MATLAB:
reactFlowNodeType = REACT_FLOW_NODE_TYPE_KEY.MatlabFileNode
// fileType = FILE_TYPE_SET.MATLAB
fileType = FILE_TYPE_SET.MATLAB
break
}
const newNode = {
Expand Down

0 comments on commit b27ef37

Please sign in to comment.