Spaces:
Running
Running
Yann
commited on
Commit
·
35961be
1
Parent(s):
a20b04a
update css, mobile ui
Browse files
front/.gitignore
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
-
node_modules
|
2 |
package-lock.json
|
|
|
|
1 |
+
node_modules/
|
2 |
package-lock.json
|
3 |
+
dist/
|
front/src/components/AppBar/MainAppBar.tsx
CHANGED
@@ -46,12 +46,25 @@ const MainAppBar: FC<HeaderProps> = ({ onMobile, window }) => {
|
|
46 |
|
47 |
const navigate = useNavigate()
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
return (
|
50 |
<>
|
51 |
<AppBar position="sticky" elevation={trigger ? 0 : 0}>
|
52 |
<Toolbar>
|
53 |
<Grid container spacing={1} alignItems="center">
|
54 |
-
<Grid item sx={{ display: "flex", alignItems: "center", alignContent:"center"}} onClick={(e) => navigate('/Home')}>
|
55 |
<Home sx={{pr: 1.5, fontSize:30}}/>
|
56 |
<Typography
|
57 |
color="inherit"
|
@@ -182,16 +195,7 @@ const MainAppBar: FC<HeaderProps> = ({ onMobile, window }) => {
|
|
182 |
);
|
183 |
};
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
top: "50%",
|
188 |
-
left: "50%",
|
189 |
-
transform: "translate(-50%, -50%)",
|
190 |
-
width: "auto",
|
191 |
-
color: "inherit",
|
192 |
-
bgcolor: "background.paper",
|
193 |
-
p: 4,
|
194 |
-
borderRadius: "10px",
|
195 |
-
}
|
196 |
|
197 |
export default MainAppBar;
|
|
|
46 |
|
47 |
const navigate = useNavigate()
|
48 |
|
49 |
+
|
50 |
+
const style_modal = {
|
51 |
+
position: "absolute" as "absolute",
|
52 |
+
top: !isSxUp ? "50%" : "50%",
|
53 |
+
left: "50%",
|
54 |
+
transform: "translate(-50%, -50%)",
|
55 |
+
width: !isSxUp ? "97%" : "auto",
|
56 |
+
color: "inherit",
|
57 |
+
bgcolor: "background.paper",
|
58 |
+
p: !isSxUp ? 4 : 4,
|
59 |
+
borderRadius: "35px",
|
60 |
+
}
|
61 |
+
|
62 |
return (
|
63 |
<>
|
64 |
<AppBar position="sticky" elevation={trigger ? 0 : 0}>
|
65 |
<Toolbar>
|
66 |
<Grid container spacing={1} alignItems="center">
|
67 |
+
<Grid item sx={{ display: "flex", alignItems: "center", alignContent:"center", cursor:"pointer"}} onClick={(e) => navigate('/Home')}>
|
68 |
<Home sx={{pr: 1.5, fontSize:30}}/>
|
69 |
<Typography
|
70 |
color="inherit"
|
|
|
195 |
);
|
196 |
};
|
197 |
|
198 |
+
|
199 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
|
201 |
export default MainAppBar;
|
front/src/pages/Home/Home.tsx
CHANGED
@@ -39,7 +39,7 @@ const Home = () => {
|
|
39 |
}}
|
40 |
>
|
41 |
<Stack sx={{ height: '100%', borderRadius: '12px', gap: "30px", minWidth: "20vw", maxWidth:"300px"}}>
|
42 |
-
<Card variant="outlined" onClick={() => navigate("/Inference")}>
|
43 |
<Box>
|
44 |
<CardContent sx={{ display: "flex", justifyItems: "center", flexDirection: "row-reverse", alignItems:"center", justifyContent: "flex-end", userSelect: "none", gap:"30px"}}>
|
45 |
<Box sx={{ display: "flex", flexDirection:"column" }}>
|
@@ -52,7 +52,7 @@ const Home = () => {
|
|
52 |
</Card>
|
53 |
<Box></Box>
|
54 |
<Divider>Or</Divider>
|
55 |
-
<Card variant="outlined"
|
56 |
<Box sx={{ display: "inherit"}}>
|
57 |
<CardContent sx={{ display: "flex", justifyItems: "center", flexDirection: "row-reverse", alignItems:"center", justifyContent: "flex-end", gap:"30px", userSelect: "none"}}>
|
58 |
<Box sx={{ display: "flex", flexDirection:"column" }}>
|
|
|
39 |
}}
|
40 |
>
|
41 |
<Stack sx={{ height: '100%', borderRadius: '12px', gap: "30px", minWidth: "20vw", maxWidth:"300px"}}>
|
42 |
+
<Card variant="outlined" sx={{cursor:"pointer"}} onClick={() => navigate("/Inference")}>
|
43 |
<Box>
|
44 |
<CardContent sx={{ display: "flex", justifyItems: "center", flexDirection: "row-reverse", alignItems:"center", justifyContent: "flex-end", userSelect: "none", gap:"30px"}}>
|
45 |
<Box sx={{ display: "flex", flexDirection:"column" }}>
|
|
|
52 |
</Card>
|
53 |
<Box></Box>
|
54 |
<Divider>Or</Divider>
|
55 |
+
<Card variant="outlined" sx={{cursor:"pointer"}} onClick={() => handleClick()}>
|
56 |
<Box sx={{ display: "inherit"}}>
|
57 |
<CardContent sx={{ display: "flex", justifyItems: "center", flexDirection: "row-reverse", alignItems:"center", justifyContent: "flex-end", gap:"30px", userSelect: "none"}}>
|
58 |
<Box sx={{ display: "flex", flexDirection:"column" }}>
|
front/src/pages/Inference/Results/Results.tsx
CHANGED
@@ -9,6 +9,8 @@ import {
|
|
9 |
LinearProgress,
|
10 |
Stack,
|
11 |
Typography,
|
|
|
|
|
12 |
} from "@mui/material";
|
13 |
import MainContainer from "../../../components/Container/MainContainer";
|
14 |
import {
|
@@ -29,6 +31,9 @@ import ReactAudioPlayer from "react-audio-player";
|
|
29 |
|
30 |
const Results = () => {
|
31 |
const navigate = useNavigate();
|
|
|
|
|
|
|
32 |
|
33 |
const handleRetry = () => {
|
34 |
// Implement retry logic here
|
@@ -130,22 +135,25 @@ const Results = () => {
|
|
130 |
Download Preset
|
131 |
</Typography>
|
132 |
</Fab>
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
<RestartAlt />
|
142 |
-
<Typography
|
143 |
-
color="inherit"
|
144 |
-
sx={{ mr: 1, fontSize: 16, fontWeight: 500, mt: 0.3, ml: 2 }}
|
145 |
>
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
</Stack>
|
150 |
</Box>
|
151 |
</MainContainer>
|
|
|
9 |
LinearProgress,
|
10 |
Stack,
|
11 |
Typography,
|
12 |
+
useMediaQuery,
|
13 |
+
useTheme,
|
14 |
} from "@mui/material";
|
15 |
import MainContainer from "../../../components/Container/MainContainer";
|
16 |
import {
|
|
|
31 |
|
32 |
const Results = () => {
|
33 |
const navigate = useNavigate();
|
34 |
+
const theme = useTheme();
|
35 |
+
|
36 |
+
const isSxUp = useMediaQuery(theme.breakpoints.up('sm'));
|
37 |
|
38 |
const handleRetry = () => {
|
39 |
// Implement retry logic here
|
|
|
135 |
Download Preset
|
136 |
</Typography>
|
137 |
</Fab>
|
138 |
+
{isSxUp ?
|
139 |
+
|
140 |
+
<><Divider sx={{ width: "5vw", py: 2 }}>Or</Divider><Fab
|
141 |
+
color="surface"
|
142 |
+
sx={{ mt: 5, height: "70px" }}
|
143 |
+
variant="extended"
|
144 |
+
component={Link}
|
145 |
+
to="/Inference"
|
|
|
|
|
|
|
|
|
146 |
>
|
147 |
+
<RestartAlt />
|
148 |
+
<Typography
|
149 |
+
color="inherit"
|
150 |
+
sx={{ mr: 1, fontSize: 16, fontWeight: 500, mt: 0.3, ml: 2 }}
|
151 |
+
>
|
152 |
+
Retry
|
153 |
+
</Typography>
|
154 |
+
</Fab></> :
|
155 |
+
|
156 |
+
<Box></Box>}
|
157 |
</Stack>
|
158 |
</Box>
|
159 |
</MainContainer>
|
front/src/requests/upload.tsx
CHANGED
@@ -215,8 +215,8 @@ const AudioUploader = ({ ...props }) => {
|
|
215 |
>
|
216 |
<Box sx={{ mr: "1" }}>
|
217 |
<Button
|
218 |
-
variant="
|
219 |
-
|
220 |
onClick={() => {
|
221 |
setNextCard(false);
|
222 |
setIsVisible(false);
|
|
|
215 |
>
|
216 |
<Box sx={{ mr: "1" }}>
|
217 |
<Button
|
218 |
+
variant="text"
|
219 |
+
sx={{fontSize:"10px", marginTop:-2, marginRight:-1.5}}
|
220 |
onClick={() => {
|
221 |
setNextCard(false);
|
222 |
setIsVisible(false);
|