Skip to content

Commit

Permalink
EPMRPP-76850 || App footer links (#3084)
Browse files Browse the repository at this point in the history
Co-authored-by: Artsiom Sadouski <artsiom_sadouski@epam.com>
  • Loading branch information
tr1ble and tr1ble committed Apr 28, 2022
1 parent bf48737 commit d9b2e08
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/localization/translated/be.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,8 @@
"Footer.copyright": "Усе правы абаронены.",
"Footer.documentation": "Дакументацыя",
"Footer.git": "Мы на GitHub",
"Footer.notice": "Паведамленне аб канфідэнцыяльнасці",
"Footer.privacy": "Палітыка прыватнасці",
"Footer.slack": "Паразмаўляем у Slack",
"ForceUpdateModal.additionalText": "Калі ласка, аўтарызуйцеся зноўку, каб прымяніць змены!",
"ForceUpdateModal.header": "Увага!",
Expand Down
2 changes: 2 additions & 0 deletions app/localization/translated/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,8 @@
"Footer.copyright": "Все права защищены",
"Footer.documentation": "Документация",
"Footer.git": "Мы на GitHub",
"Footer.notice": "Уведомление о конфиденциальности",
"Footer.privacy": "Политика конфиденциальности",
"Footer.slack": "Пообщайтесь с нами на Slack",
"ForceUpdateModal.additionalText": "Пожалуйста, авторизуйтесь заново, чтобы применить изменения!",
"ForceUpdateModal.header": "Внимание!",
Expand Down
2 changes: 2 additions & 0 deletions app/localization/translated/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,8 @@
"Footer.copyright": "Всі права захищені",
"Footer.documentation": "Документація",
"Footer.git": "Ми на Гітхабі",
"Footer.notice": "Повідомлення про конфіденційність",
"Footer.privacy": "Політика конфіденційності",
"Footer.slack": "Поспілкуйтеся з нами на слабину",
"ForceUpdateModal.additionalText": "Будь ласка, авторизуйтеся заново, щоб застосувати зміни!",
"ForceUpdateModal.header": "Увага!",
Expand Down
2 changes: 2 additions & 0 deletions app/src/common/utils/referenceDictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ export const referenceDictionary = {
rpSlack: 'https://reportportal-slack-auto.herokuapp.com/',
rpEmail: 'mailto:support@reportportal.io',
rpEpam: 'https://www.epam.com/',
rpEpamPolicy: 'https://privacy.epam.com/core/interaction/showpolicy?type=PrivacyPolicy',
rpEpamNotice: 'https://privacy.epam.com/core/interaction/showpolicy?type=CommonPrivacyNotice',
};
18 changes: 15 additions & 3 deletions app/src/layouts/common/footer/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@
* limitations under the License.
*/

import React, { Component } from 'react';
import React, { Component, Fragment } from 'react';
import track from 'react-tracking';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import classNames from 'classnames/bind';
import { FormattedMessage } from 'react-intl';
import { FOOTER_EVENTS } from 'components/main/analytics/events';
import { uiBuildVersionSelector } from 'controllers/appInfo';
import { uiBuildVersionSelector, authExtensionsSelector } from 'controllers/appInfo';
import { referenceDictionary } from 'common/utils/referenceDictionary';
import styles from './footer.scss';

const cx = classNames.bind(styles);

@connect((state) => ({
buildVersion: uiBuildVersionSelector(state),
authExtensions: authExtensionsSelector(state),
}))
@track()
export class Footer extends Component {
Expand All @@ -38,9 +39,10 @@ export class Footer extends Component {
trackEvent: PropTypes.func,
getTrackingData: PropTypes.func,
}).isRequired,
authExtensions: PropTypes.object.isRequired,
};
render() {
const { buildVersion, tracking } = this.props;
const { buildVersion, tracking, authExtensions } = this.props;
return (
<footer className={cx('footer')}>
<div className={cx('footer-links')}>
Expand Down Expand Up @@ -78,6 +80,16 @@ export class Footer extends Component {
>
<FormattedMessage id={'Footer.documentation'} defaultMessage={'Documentation'} />
</a>
{authExtensions.epam && (
<Fragment>
<a href={referenceDictionary.rpEpamPolicy} target="_blank">
<FormattedMessage id={'Footer.privacy'} defaultMessage={'Privacy Policy'} />
</a>
<a href={referenceDictionary.rpEpamNotice} target="_blank">
<FormattedMessage id={'Footer.notice'} defaultMessage={'Privacy Notice'} />
</a>
</Fragment>
)}
</div>
<div className={cx('text-wrapper')}>
<div className={cx('footer-text')}>
Expand Down

0 comments on commit d9b2e08

Please sign in to comment.