1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

[MMI] Added code fencing in info tab component (#17910)

* Added code fencing in info tab component

* Fixed storybook urls

* Removed isBeta mmi code fencing
This commit is contained in:
Albert Olivé 2023-03-31 13:23:11 +02:00 committed by GitHub
parent 234fb4ac5d
commit c2618176f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 13 deletions

View File

@ -12,8 +12,8 @@ _supportRequestLink =
///: BEGIN:ONLY_INCLUDE_IN(mmi) ///: BEGIN:ONLY_INCLUDE_IN(mmi)
_supportRequestLink = 'https://mmi-support.zendesk.com/hc/en-us/requests/new'; _supportRequestLink = 'https://mmi-support.zendesk.com/hc/en-us/requests/new';
const _mmiWebSite = 'https://metamask.io/institutions/'; export const SUPPORT_LINK = 'https://mmi-support.zendesk.com/hc/en-us';
export const MMI_WEB_SITE = _mmiWebSite; export const MMI_WEB_SITE = 'https://metamask.io/institutions/';
///: END:ONLY_INCLUDE_IN ///: END:ONLY_INCLUDE_IN
export const SUPPORT_REQUEST_LINK = _supportRequestLink; export const SUPPORT_REQUEST_LINK = _supportRequestLink;

View File

@ -4,7 +4,12 @@ import PropTypes from 'prop-types';
import Button from '../../../components/ui/button'; import Button from '../../../components/ui/button';
import { Tag } from '../../../components/component-library'; import { Tag } from '../../../components/component-library';
import { SUPPORT_REQUEST_LINK } from '../../../helpers/constants/common'; import {
SUPPORT_REQUEST_LINK,
///: BEGIN:ONLY_INCLUDE_IN(mmi)
MMI_WEB_SITE,
///: END:ONLY_INCLUDE_IN
} from '../../../helpers/constants/common';
import { isBeta } from '../../../helpers/utils/build-types'; import { isBeta } from '../../../helpers/utils/build-types';
import { import {
getNumberOfSettingsInSection, getNumberOfSettingsInSection,
@ -47,6 +52,17 @@ export default class InfoTab extends PureComponent {
renderInfoLinks() { renderInfoLinks() {
const { t } = this.context; const { t } = this.context;
let privacyUrl, siteUrl;
///: BEGIN:ONLY_INCLUDE_IN(mmi)
privacyUrl = 'https://consensys.net/codefi/about/privacy-policy/';
siteUrl = MMI_WEB_SITE;
///: END:ONLY_INCLUDE_IN
///: BEGIN:ONLY_INCLUDE_IN(main,beta,flask)
privacyUrl = 'https://metamask.io/privacy.html';
siteUrl = 'https://metamask.io/';
///: END:ONLY_INCLUDE_IN
return ( return (
<div className="settings-page__content-item settings-page__content-item--without-height"> <div className="settings-page__content-item settings-page__content-item--without-height">
@ -56,7 +72,7 @@ export default class InfoTab extends PureComponent {
<div ref={this.settingsRefs[2]} className="info-tab__link-item"> <div ref={this.settingsRefs[2]} className="info-tab__link-item">
<Button <Button
type="link" type="link"
href="https://metamask.io/privacy.html" href={privacyUrl}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="info-tab__link-text" className="info-tab__link-text"
@ -129,7 +145,7 @@ export default class InfoTab extends PureComponent {
<div ref={this.settingsRefs[6]} className="info-tab__link-item"> <div ref={this.settingsRefs[6]} className="info-tab__link-item">
<Button <Button
type="link" type="link"
href="https://metamask.io/" href={siteUrl}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="info-tab__link-text" className="info-tab__link-text"
@ -173,6 +189,17 @@ export default class InfoTab extends PureComponent {
<div className="settings-page__body"> <div className="settings-page__body">
<div className="settings-page__content-row"> <div className="settings-page__content-row">
<div className="settings-page__content-item settings-page__content-item--without-height"> <div className="settings-page__content-item settings-page__content-item--without-height">
{
///: BEGIN:ONLY_INCLUDE_IN(mmi)
<div className="info-tab__logo-wrapper">
<img
src="images/info-logo.png"
className="info-tab__logo"
alt=""
/>
</div>
///: END:ONLY_INCLUDE_IN
}
<div className="info-tab__item"> <div className="info-tab__item">
<div <div
ref={this.settingsRefs[0]} ref={this.settingsRefs[0]}
@ -185,18 +212,33 @@ export default class InfoTab extends PureComponent {
</div> </div>
</div> </div>
<div className="info-tab__item"> <div className="info-tab__item">
<div className="info-tab__about">{t('builtAroundTheWorld')}</div> <div className="info-tab__about">
{
///: BEGIN:ONLY_INCLUDE_IN(main,beta,flask)
t('builtAroundTheWorld')
///: END:ONLY_INCLUDE_IN
}
{
///: BEGIN:ONLY_INCLUDE_IN(mmi)
t('mmiBuiltAroundTheWorld')
///: END:ONLY_INCLUDE_IN
}
</div>
</div> </div>
</div> </div>
{this.renderInfoLinks()} {this.renderInfoLinks()}
</div> </div>
<div className="info-tab__logo-wrapper"> {
<img ///: BEGIN:ONLY_INCLUDE_IN(main,beta,flask)
src="./images/logo/metamask-fox.svg" <div className="info-tab__logo-wrapper">
className="info-tab__logo" <img
alt="MetaMask Logo" src="./images/logo/metamask-fox.svg"
/> className="info-tab__logo"
</div> alt="MetaMask Logo"
/>
</div>
///: END:ONLY_INCLUDE_IN
}
</div> </div>
); );
} }