1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 04:46:10 +01:00
metamask-extension/ui/pages/settings/info-tab/info-tab.component.js

119 lines
3.4 KiB
JavaScript
Raw Normal View History

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Button from '../../../components/ui/button';
export default class InfoTab extends PureComponent {
state = {
version: global.platform.getVersion(),
};
static contextTypes = {
t: PropTypes.func,
};
2020-11-03 00:41:28 +01:00
renderInfoLinks() {
const { t } = this.context;
return (
<div className="settings-page__content-item settings-page__content-item--without-height">
2020-11-03 00:41:28 +01:00
<div className="info-tab__link-header">{t('links')}</div>
<div className="info-tab__link-item">
<Button
type="link"
href="https://metamask.io/privacy.html"
target="_blank"
rel="noopener noreferrer"
className="info-tab__link-text"
>
2020-11-03 00:41:28 +01:00
{t('privacyMsg')}
</Button>
</div>
<div className="info-tab__link-item">
<Button
type="link"
href="https://metamask.io/terms.html"
target="_blank"
rel="noopener noreferrer"
className="info-tab__link-text"
>
2020-11-03 00:41:28 +01:00
{t('terms')}
</Button>
</div>
<div className="info-tab__link-item">
<Button
type="link"
href="https://metamask.io/attributions.html"
target="_blank"
rel="noopener noreferrer"
className="info-tab__link-text"
>
2020-11-03 00:41:28 +01:00
{t('attributions')}
</Button>
</div>
<hr className="info-tab__separator" />
<div className="info-tab__link-item">
<Button
type="link"
href="https://support.metamask.io"
target="_blank"
rel="noopener noreferrer"
className="info-tab__link-text"
>
2020-11-03 00:41:28 +01:00
{t('supportCenter')}
</Button>
</div>
<div className="info-tab__link-item">
<Button
type="link"
href="https://metamask.io/"
target="_blank"
rel="noopener noreferrer"
className="info-tab__link-text"
>
2020-11-03 00:41:28 +01:00
{t('visitWebSite')}
</Button>
</div>
<div className="info-tab__link-item">
<Button
type="link"
2020-07-29 23:05:19 +02:00
href="https://metamask.zendesk.com/hc/en-us/requests/new"
target="_blank"
rel="noopener noreferrer"
className="info-tab__link-text"
>
2020-11-03 00:41:28 +01:00
{t('contactUs')}
</Button>
</div>
</div>
);
}
2020-11-03 00:41:28 +01:00
render() {
const { t } = this.context;
return (
<div className="settings-page__body">
<div className="settings-page__content-row">
<div className="settings-page__content-item settings-page__content-item--without-height">
<div className="info-tab__item">
<div className="info-tab__version-header">
2020-11-03 00:41:28 +01:00
{t('metamaskVersion')}
</div>
<div className="info-tab__version-number">
2020-11-03 00:41:28 +01:00
{this.state.version}
</div>
</div>
<div className="info-tab__item">
<div className="info-tab__about">{t('builtAroundTheWorld')}</div>
</div>
</div>
2020-11-03 00:41:28 +01:00
{this.renderInfoLinks()}
</div>
2021-01-14 14:20:44 +01:00
<div className="info-tab__logo-wrapper">
<img src="images/info-logo.png" className="info-tab__logo" alt="" />
</div>
</div>
);
}
}