diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index 869baed..02220f0 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -58,6 +58,7 @@ "ApiHostName": "API host", "Domain": "Domain", "ActiveSession": "Active session", - "ActiveSessionSubtitle": "Expand to see forwards" + "ActiveSessionSubtitle": "Expand to see forwards", + "DDNSProvider": "Dynamic DNS Provider" } } diff --git a/public/locales/ro/translations.json b/public/locales/ro/translations.json index e428969..37e323f 100644 --- a/public/locales/ro/translations.json +++ b/public/locales/ro/translations.json @@ -49,6 +49,7 @@ "ApiHostName": "Gazdă API", "Domain": "Domeniu", "ActiveSession": "Sesiune activă", - "ActiveSessionSubtitle": "Extindeţi pentru a vedea redirectările" + "ActiveSessionSubtitle": "Extindeţi pentru a vedea redirectările", + "DDNSProvider": "Furnizor DNS dinamic" } } diff --git a/src/features/server/components/ActiveSessionSummary.js b/src/features/server/components/ActiveSessionSummary.js index 0beb1ad..4a38fb4 100644 --- a/src/features/server/components/ActiveSessionSummary.js +++ b/src/features/server/components/ActiveSessionSummary.js @@ -13,12 +13,12 @@ const ActiveSessionSummary = ({ session }) => { return ( - + {`${t("Session.RunningTime")}: `} {session.runningTime} - + {`${t("Session.StartDate")}: `} {t("DATE_FORMAT", { @@ -27,10 +27,15 @@ const ActiveSessionSummary = ({ session }) => { - + {`${t("Session.Host")}: `} {session.hostName} + + + {`${t("Session.Forwards.Title")}: `} + {session.forwardsNumber} + ); }; diff --git a/src/features/server/components/ServerComponent.js b/src/features/server/components/ServerComponent.js index b06087f..4f6aa0a 100644 --- a/src/features/server/components/ServerComponent.js +++ b/src/features/server/components/ServerComponent.js @@ -23,7 +23,12 @@ import { useTranslation } from "react-i18next"; const useStyles = makeStyles(styles); -const ServerComponent = ({ data, serverHost, openAbout }) => { +const ServerComponent = ({ + data, + serverHost, + openAbout, + handleOpenInNewTab +}) => { const classes = useStyles(); const { t } = useTranslation(); @@ -55,6 +60,7 @@ const ServerComponent = ({ data, serverHost, openAbout }) => { data={data} serverHost={serverHost} openAbout={openAbout} + handleOpenInNewTab={handleOpenInNewTab} /> )} @@ -114,7 +120,8 @@ const ServerComponent = ({ data, serverHost, openAbout }) => { ServerComponent.propTypes = { data: PropTypes.object.isRequired, serverHost: PropTypes.string, - openAbout: PropTypes.func.isRequired + openAbout: PropTypes.func.isRequired, + handleOpenInNewTab: PropTypes.func.isRequired }; export default ServerComponent; diff --git a/src/features/server/components/ServerContainer.js b/src/features/server/components/ServerContainer.js index ec13b00..1fe6601 100644 --- a/src/features/server/components/ServerContainer.js +++ b/src/features/server/components/ServerContainer.js @@ -17,11 +17,17 @@ const ServerContainer = ({ actions, data, serverHost, history }) => { event.preventDefault(); }; + const handleOpenInNewTab = (url) => (event) => { + window.open(url, "_blank"); + event.preventDefault(); + }; + return ( ); }; diff --git a/src/features/server/components/ServerSummary.js b/src/features/server/components/ServerSummary.js index 581c0d1..624ac5b 100644 --- a/src/features/server/components/ServerSummary.js +++ b/src/features/server/components/ServerSummary.js @@ -7,28 +7,37 @@ import styles from "../../../components/common/styles/gridStyles"; const useStyles = makeStyles(styles); -const ServerSummary = ({ data, serverHost, openAbout }) => { +const ServerSummary = ({ data, serverHost, openAbout, handleOpenInNewTab }) => { const classes = useStyles(); const { t } = useTranslation(); return ( - + {`${t("Server.Domain")}: `} {data.domain.name} - + {`${t("Server.ServerHostName")}: `} {serverHost || ""} - + {`${t("Server.ApiHostName")}: `} {data.hosts.api} - + + {`${t("Server.DDNSProvider")}: `} + + {data.domain.provider.name} + + @@ -47,7 +56,8 @@ const ServerSummary = ({ data, serverHost, openAbout }) => { ServerSummary.propTypes = { data: PropTypes.object.isRequired, serverHost: PropTypes.string, - openAbout: PropTypes.func.isRequired + openAbout: PropTypes.func.isRequired, + handleOpenInNewTab: PropTypes.func.isRequired }; export default ServerSummary;