Skip to content

Commit 7f183ea

Browse files
committed
Merge staging into dev: resolved yarn.lock conflicts
2 parents a8c07de + a8d68b8 commit 7f183ea

5 files changed

Lines changed: 527 additions & 950 deletions

File tree

craco.config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
module.exports = {
2+
webpack: {
3+
configure: (webpackConfig) => {
4+
return webpackConfig;
5+
},
6+
},
7+
devServer: (devServerConfig, { env, paths, proxy, allowedHost }) => {
8+
// Create a new config object based on the old one
9+
const newConfig = {
10+
...devServerConfig,
11+
};
12+
13+
// Remove deprecated options that are not compatible with webpack-dev-server v5
14+
delete newConfig.onBeforeSetupMiddleware;
15+
delete newConfig.onAfterSetupMiddleware;
16+
delete newConfig.https;
17+
18+
// Handle https option - it should be moved to server.type and server.options
19+
if (devServerConfig.https) {
20+
if (typeof devServerConfig.https === 'boolean' && devServerConfig.https) {
21+
newConfig.server = 'https';
22+
} else if (typeof devServerConfig.https === 'object') {
23+
newConfig.server = {
24+
type: 'https',
25+
options: devServerConfig.https,
26+
};
27+
}
28+
} else {
29+
newConfig.server = 'http';
30+
}
31+
32+
newConfig.setupMiddlewares = (middlewares, devServer) => {
33+
if (!devServer) {
34+
throw new Error('webpack-dev-server is not defined');
35+
}
36+
37+
return middlewares;
38+
};
39+
40+
return newConfig;
41+
},
42+
};

package.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
"web-vitals": "^2.1.0"
4444
},
4545
"scripts": {
46-
"start": "react-scripts start",
47-
"build": "react-scripts build",
48-
"test": "react-scripts test",
46+
"start": "craco start",
47+
"build": "craco build",
48+
"test": "craco test",
4949
"eject": "react-scripts eject",
5050
"analyze": "source-map-explorer 'build/static/js/*.js'"
5151
},
@@ -63,11 +63,22 @@
6363
},
6464
"devDependencies": {
6565
"@babel/plugin-proposal-private-property-in-object": "^7.0.0",
66+
"@craco/craco": "^7.1.0",
67+
"baseline-browser-mapping": "^2.9.8",
6668
"source-map-explorer": "^2.5.3",
6769
"source-map-loader": "^5.0.0",
6870
"webpack": "^5.94.0",
6971
"webpack-cli": "^5.1.4",
7072
"webpack-dev-server": "^5.2.3"
7173
},
74+
"resolutions": {
75+
"nth-check": "^2.1.1",
76+
"glob": "^11.0.0",
77+
"webpack-dev-server": "^5.2.2",
78+
"postcss": "^8.4.49",
79+
"js-yaml": "^4.1.1",
80+
"mdast-util-to-hast": "^13.2.1",
81+
"node-forge": "^1.3.2"
82+
},
7283
"packageManager": "yarn@4.9.2+sha512.1fc009bc09d13cfd0e19efa44cbfc2b9cf6ca61482725eb35bbc5e257e093ebf4130db6dfe15d604ff4b79efd8e1e8e99b25fa7d0a6197c9f9826358d4d65c3c"
7384
}

src/Components/Navbar.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,13 @@ const Navbar = () => {
6363
subLinks: [
6464
{
6565
label: t("papers.whitepaper", "Whitepaper"),
66-
href: "https://drive.google.com/drive/u/1/folders/1njL9EHV1-nh3oHW9a-2IMuNdSmUIMggC"
66+
href: "https://drive.google.com/file/d/1MobJrt1HkyZa956sdN2a3ux3B1vzIQ3Z/view"
6767
},
68-
{
69-
label: t("papers.threatModel", "Threat Model"),
70-
href: "/files/threat-model.pdf"
71-
}
68+
{
69+
label: t("papers.threatModel", "Threat Model"),
70+
href: "/threat-model",
71+
comingSoon: true
72+
}
7273
]
7374
}
7475
];

src/Pages/ThreatModel.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import React from "react";
2+
import { Box, Typography, Paper } from "@mui/material";
3+
import ConstructionIcon from "@mui/icons-material/Construction";
4+
import Navbar from "../Components/Navbar";
5+
import { useTheme } from "../Context/ThemeContext";
6+
import { useTranslation } from "react-i18next";
7+
8+
const ThreatModel = () => {
9+
const { t, i18n } = useTranslation();
10+
const isFarsi = i18n.language === "fa";
11+
const { mode } = useTheme();
12+
13+
const backgroundColor = mode === "light" ? "#f0f7fa" : "#040424";
14+
const paperBg = mode === "light" ? "#ffffff" : "#121246";
15+
const textColor = mode === "light" ? "#000" : "#fff";
16+
const secondaryTextColor = mode === "light" ? "#555" : "#ccc";
17+
18+
return (
19+
<>
20+
<Navbar />
21+
22+
<Box
23+
sx={{
24+
minHeight: "100vh",
25+
display: "flex",
26+
justifyContent: "center",
27+
alignItems: "center",
28+
backgroundColor: backgroundColor,
29+
p: 2,
30+
31+
direction: isFarsi ? "rtl" : "ltr",
32+
}}
33+
>
34+
<Paper
35+
elevation={8}
36+
sx={{
37+
p: 4,
38+
borderRadius: 5,
39+
textAlign: "center",
40+
maxWidth: 800,
41+
width: "100%",
42+
bgcolor: paperBg,
43+
color: textColor,
44+
}}
45+
>
46+
<ConstructionIcon
47+
sx={{
48+
fontSize: 60,
49+
color: "#ff6a14",
50+
mb: 2,
51+
}}
52+
/>
53+
<Typography variant="h3" gutterBottom sx={{ fontWeight: 600 }}>
54+
{t("ThreatModelHeader", "Threat Model")}
55+
</Typography>
56+
<Typography variant="h6" gutterBottom sx={{ color: secondaryTextColor }}>
57+
{t(
58+
"ThreatModelComingSoon",
59+
"This page is coming soon! Stay tuned for updates."
60+
)}
61+
</Typography>
62+
<Typography variant="body2" sx={{ color: secondaryTextColor }}>
63+
{t(
64+
"ThreatModelDescription",
65+
"We are working hard to bring you the detailed threat model."
66+
)}
67+
</Typography>
68+
</Paper>
69+
</Box>
70+
</>
71+
);
72+
};
73+
74+
export default ThreatModel;

0 commit comments

Comments
 (0)