Skip to content

Commit 906868a

Browse files
committed
added 'Tools' section in navbar
1 parent cffcb80 commit 906868a

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed

src/components/A3S.tsx

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Typography from "@mui/material/Typography";
77
import Menu from "@mui/material/Menu";
88
import MenuIcon from "@mui/icons-material/Menu";
99
import Container from "@mui/material/Container";
10-
import Avatar from "@mui/material/Avatar";
10+
import MoreIcon from "@mui/icons-material/MoreVert";
1111
import Button from "@mui/material/Button";
1212
import Tooltip from "@mui/material/Tooltip";
1313
import MenuItem from "@mui/material/MenuItem";
@@ -114,6 +114,7 @@ export function NavBar() {
114114
))}
115115
</Menu>
116116
</Box>
117+
117118
<AdbIcon sx={{ display: { xs: "flex", md: "none" }, mr: 1 }} />
118119
<Typography
119120
variant="h5"
@@ -133,6 +134,7 @@ export function NavBar() {
133134
>
134135
A3S
135136
</Typography>
137+
136138
<Box sx={{ flexGrow: 1, display: { xs: "none", md: "flex" } }}>
137139
{pages.map((page) => (
138140
<Link
@@ -152,6 +154,39 @@ export function NavBar() {
152154
</Link>
153155
))}
154156
</Box>
157+
158+
<Box sx={{ display: "flex" }}>
159+
<Tooltip title="Tools">
160+
<IconButton
161+
size="large"
162+
aria-label="tools"
163+
aria-controls="menu-appbar-tools"
164+
aria-haspopup="true"
165+
onClick={handleOpenUserMenu}
166+
color="inherit"
167+
>
168+
<MoreIcon />
169+
</IconButton>
170+
</Tooltip>
171+
<Menu
172+
id="menu-appbar-tools"
173+
anchorEl={anchorElUser}
174+
anchorOrigin={{
175+
vertical: "bottom",
176+
horizontal: "left",
177+
}}
178+
keepMounted
179+
transformOrigin={{
180+
vertical: "top",
181+
horizontal: "left",
182+
}}
183+
open={Boolean(anchorElUser)}
184+
onClose={handleCloseUserMenu}
185+
>
186+
<MenuItem onClick={handleCloseUserMenu}>Download</MenuItem>
187+
<MenuItem onClick={handleCloseUserMenu}>Upload</MenuItem>
188+
</Menu>
189+
</Box>
155190
</Toolbar>
156191
</Container>
157192
</AppBar>

src/components/Editor.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect, useState } from "react";
1+
import { useState } from "react";
22
import { Box, Grid } from "@mui/material";
33
import { GridColumns, GridActionsCellItem } from "@mui/x-data-grid";
44
import DeleteIcon from "@mui/icons-material/Delete";
@@ -467,14 +467,6 @@ const Editor = () => {
467467
: l
468468
);
469469

470-
471-
// const updatedRemovedTransitions = prev.filter(
472-
// (l) =>
473-
// !removedTransitions.find(
474-
// (r) =>
475-
// r.props.start === l.props.start && r.props.end === l.props.end
476-
// )
477-
// );
478470
console.log("updatedRemovedTransitions", updatedRemovedTransitions);
479471

480472
// update addedTransitions's labels & value if it's are already present

src/enums/pages.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
export enum Pages {
2-
Editor = "Editor",
3-
ConvertNFAToDFA = "Convert NFA to DFA",
4-
MinimizeDFA = "Minimize DFA",
5-
TestAString = "Test a String",
2+
Editor = "Editor",
3+
NFA_TO_DFA = "NFA to DFA",
4+
MIN_DFA = "Minimize DFA",
5+
TEST_STRING = "Test a String",
6+
Is_DFA = "Is DFA",
7+
Is_NFA = "Is NFA",
68
Help = "Help",
79
About = "About",
810
}

src/features/Download.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const Download = () => {};

0 commit comments

Comments
 (0)