diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js index 6c8807a3..914c4ad8 100644 --- a/frontend/src/components/App.js +++ b/frontend/src/components/App.js @@ -4,10 +4,12 @@ import HomePage from "./HomePage"; import { CssBaseline, IconButton , Link} from "@mui/material"; import { ThemeProvider, createTheme } from '@mui/material/styles'; import UnsafeAlert from "./UnsafeAlert"; +import { LearnDialog } from "./Dialogs"; import { I18nextProvider } from "react-i18next"; import i18n from "./i18n"; +//Icons import DarkModeIcon from '@mui/icons-material/DarkMode'; import LightModeIcon from '@mui/icons-material/LightMode'; import SchoolIcon from '@mui/icons-material/School'; @@ -17,6 +19,7 @@ export default class App extends Component { super(props); this.state = { dark: false, + openLearn: false, } } @@ -36,7 +39,8 @@ export default class App extends Component { - + this.setState({openLearn:false})}/> + this.setState({openLearn:true})}> this.setState({dark:!this.state.dark})}> {this.state.dark ? :} diff --git a/frontend/src/components/Dialogs/CommunityDialog.tsx b/frontend/src/components/Dialogs/Community.tsx similarity index 100% rename from frontend/src/components/Dialogs/CommunityDialog.tsx rename to frontend/src/components/Dialogs/Community.tsx diff --git a/frontend/src/components/Dialogs/InfoDialog.tsx b/frontend/src/components/Dialogs/Info.tsx similarity index 100% rename from frontend/src/components/Dialogs/InfoDialog.tsx rename to frontend/src/components/Dialogs/Info.tsx diff --git a/frontend/src/components/Dialogs/Learn.tsx b/frontend/src/components/Dialogs/Learn.tsx new file mode 100644 index 00000000..ae808978 --- /dev/null +++ b/frontend/src/components/Dialogs/Learn.tsx @@ -0,0 +1,50 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; +import { + Dialog, + DialogTitle, + DialogActions, + DialogContent, + DialogContentText, + Button, + Link, +} from "@mui/material" + +type Props = { + open: boolean; + onClose: () => void; +} + +const LearnDialog = ({ + open, + onClose, +}: Props): JSX.Element => { + const { t } = useTranslation(); + + return ( + + + {t("Tutorials and Documentation")} + + + + + {t("You are about to visit 'Learn.RoboSats' page. This is a community built site hosting tutorials and documentation to help you learn to use RoboSats and understand how it works.")} + + + + + + + + + + ) +} + +export default LearnDialog; diff --git a/frontend/src/components/Dialogs/NoRobotDialog.tsx b/frontend/src/components/Dialogs/NoRobot.tsx similarity index 100% rename from frontend/src/components/Dialogs/NoRobotDialog.tsx rename to frontend/src/components/Dialogs/NoRobot.tsx diff --git a/frontend/src/components/Dialogs/StoreTokenDialog.tsx b/frontend/src/components/Dialogs/StoreToken.tsx similarity index 100% rename from frontend/src/components/Dialogs/StoreTokenDialog.tsx rename to frontend/src/components/Dialogs/StoreToken.tsx diff --git a/frontend/src/components/Dialogs/index.ts b/frontend/src/components/Dialogs/index.ts index a89a89bb..518f5c9e 100644 --- a/frontend/src/components/Dialogs/index.ts +++ b/frontend/src/components/Dialogs/index.ts @@ -1,4 +1,6 @@ -export { default as CommunityDialog } from "./CommunityDialog"; -export { default as InfoDialog } from "./InfoDialog"; -export { default as StoreTokenDialog } from "./StoreTokenDialog"; -export { default as NoRobotDialog } from "./NoRobotDialog"; +export { default as CommunityDialog } from "./Community"; +export { default as InfoDialog } from "./Info"; +export { default as LearnDialog } from "./Learn"; +export { default as NoRobotDialog } from "./NoRobot"; +export { default as StoreTokenDialog } from "./StoreToken"; + diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index ed0cc297..b59ff10d 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -18,6 +18,10 @@ "Make Order":"Make Order", "Info":"Info", "View Book":"View Book", + "Tutorials and Documentation":"Tutorials and Documentation", + "You are about to visit 'Learn.RoboSats' page. This is a community built site hosting tutorials and documentation to help you learn to use RoboSats and understand how it works.":"You are about to visit 'Learn.RoboSats' page. This is a community built site hosting tutorials and documentation to help you learn to use RoboSats and understand how it works.", + "Let's go!":"Let's go!", + "MAKER PAGE - MakerPage.js": "This is the page where users can create new orders", diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index 33142536..0121d15f 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -18,8 +18,11 @@ "Make Order":"Crear orden", "Info": "Info", "View Book": "Ver libro", + "Tutorials and Documentation":"Tutoriales y Documentación", + "You are about to visit 'Learn.RoboSats' page. This is a community built site hosting tutorials and documentation to help you learn to use RoboSats and understand how it works.":"Vas a visitar la página 'Learn.RoboSats'. Ha sido construida por la comunidad y tiene tutoriales y documentación que te ayudará a aprender como se usa RoboSats y a entender como funciona.", + "Let's go!":"¡Vamos!", - + "MAKER PAGE - MakerPage.js": "This is the page where users can create new orders", "Order":"Orden", "Customize":"Personalizar",