diff --git a/src/features/server/components/ServerComponent.js b/src/features/server/components/ServerComponent.js index 9c8bb8c..c13906c 100644 --- a/src/features/server/components/ServerComponent.js +++ b/src/features/server/components/ServerComponent.js @@ -21,7 +21,7 @@ import { useTranslation } from "react-i18next"; const useStyles = makeStyles(styles); -const ServerComponent = ({ data }) => { +const ServerComponent = ({ data, openAbout }) => { const classes = useStyles(); const { t } = useTranslation(); @@ -49,7 +49,9 @@ const ServerComponent = ({ data }) => { data.hosts ? data.hosts.server : "" }`} /> - {data.loaded && } + + {data.loaded && } + @@ -104,7 +106,8 @@ const ServerComponent = ({ data }) => { }; ServerComponent.propTypes = { - data: PropTypes.object.isRequired + data: PropTypes.object.isRequired, + openAbout: PropTypes.func.isRequired }; export default ServerComponent; diff --git a/src/features/server/components/ServerContainer.js b/src/features/server/components/ServerContainer.js index 9e9dba1..56bd939 100644 --- a/src/features/server/components/ServerContainer.js +++ b/src/features/server/components/ServerContainer.js @@ -4,14 +4,20 @@ import { bindActionCreators } from "redux"; import PropTypes from "prop-types"; import { loadServerData, loadSystemVersion } from "../actionCreators"; import ServerComponent from "./ServerComponent"; +import { withRouter } from "react-router-dom"; -const ServerContainer = ({ actions, data }) => { +const ServerContainer = ({ actions, data, history }) => { useEffect(() => { actions.loadServerData(); actions.loadSystemVersion(); }, []); - return ; + const openAbout = (event) => { + history.push("/about"); + event.preventDefault(); + }; + + return ; }; ServerContainer.propTypes = { @@ -31,4 +37,7 @@ function mapDispatchToProps(dispatch) { }; } -export default connect(mapStateToProps, mapDispatchToProps)(ServerContainer); +export default connect( + mapStateToProps, + mapDispatchToProps +)(withRouter(ServerContainer)); diff --git a/src/features/server/components/ServerSummary.js b/src/features/server/components/ServerSummary.js index ac0b21d..f5f8c93 100644 --- a/src/features/server/components/ServerSummary.js +++ b/src/features/server/components/ServerSummary.js @@ -3,36 +3,52 @@ import PropTypes from "prop-types"; import { Grid } from "@material-ui/core"; import { makeStyles } from "@material-ui/core/styles"; import { useTranslation } from "react-i18next"; +import Typography from "@material-ui/core/Typography"; +import Link from "@material-ui/core/Link"; import styles from "../../../components/common/styles/gridStyles"; const useStyles = makeStyles(styles); -const ServerSummary = ({ data }) => { +const ServerSummary = ({ data, openAbout }) => { const classes = useStyles(); const { t } = useTranslation(); return ( - + {`${t("Server.Domain")}: `} {data.domain} - + {`${t("Server.ServerHostName")}: `} {data.hosts.server} - + {`${t("Server.ApiHostName")}: `} {data.hosts.api} + + + + + + { + "Bla bla bla, bla bla bla, bla bla bla, Bla bla bla, bla bla bla, bla bla bla, Bla bla bla, bla bla bla. Pentru mai multe detalii click " + } + + {"aici"} + + + ); }; ServerSummary.propTypes = { - data: PropTypes.object.isRequired + data: PropTypes.object.isRequired, + openAbout: PropTypes.func.isRequired }; export default ServerSummary;