diff --git a/client/.env b/client/.env new file mode 100644 index 00000000..dad98e46 --- /dev/null +++ b/client/.env @@ -0,0 +1 @@ +REACT_APP_VERSION=1.10.0 diff --git a/client/src/components/UserSettingsModal/AboutPane.jsx b/client/src/components/UserSettingsModal/AboutPane.jsx index 15634769..d00a4ddf 100644 --- a/client/src/components/UserSettingsModal/AboutPane.jsx +++ b/client/src/components/UserSettingsModal/AboutPane.jsx @@ -1,17 +1,22 @@ import React from 'react'; -// import { useTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next'; import { Image, Tab } from 'semantic-ui-react'; +import Config from '../../constants/Config'; + import logo from '../../assets/images/logo.png'; import styles from './AboutPane.module.scss'; const AboutPane = React.memo(() => { - // const [t] = useTranslation(); + const [t] = useTranslation(); return ( - + +
+ {t('common.version')} {Config.VERSION} +
); }); diff --git a/client/src/components/UserSettingsModal/AboutPane.module.scss b/client/src/components/UserSettingsModal/AboutPane.module.scss index f881c527..138ff9e1 100644 --- a/client/src/components/UserSettingsModal/AboutPane.module.scss +++ b/client/src/components/UserSettingsModal/AboutPane.module.scss @@ -1,7 +1,8 @@ :global(#app) { - /* .logo { - margin-bottom: 16px; - } */ + .version { + font-weight: bold; + text-align: center; + } .wrapper { border: none; diff --git a/client/src/constants/Config.js b/client/src/constants/Config.js index 3035ebbf..50128e09 100755 --- a/client/src/constants/Config.js +++ b/client/src/constants/Config.js @@ -1,3 +1,5 @@ +const VERSION = process.env.REACT_APP_VERSION; + const { BASE_URL } = window; const BASE_PATH = BASE_URL.replace(/^.*\/\/[^/]*(.*)[^?#]*.*$/, '$1'); @@ -15,6 +17,7 @@ const POSITION_GAP = 65535; const ACTIVITIES_LIMIT = 50; export default { + VERSION, BASE_PATH, SERVER_BASE_URL, SERVER_HOST_NAME, diff --git a/client/src/locales/en/core.js b/client/src/locales/en/core.js index 16935fe3..eec6b5d1 100644 --- a/client/src/locales/en/core.js +++ b/client/src/locales/en/core.js @@ -155,6 +155,7 @@ export default { username: 'Username', usernameAlreadyInUse: 'Username already in use', users: 'Users', + version: 'Version', viewer: 'Viewer', writeComment: 'Write a comment...', },