import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Modal from 'react-bootstrap-modal'; import detect from 'browser-detect'; import './AboutModal.styl'; import { withTranslation } from '../../utils/LanguageProvider'; import 'react-bootstrap-modal/lib/css/rbm-patch.css'; // TODO: Is this the only component importing these? import './../../design/styles/common/modal.styl'; class AboutModal extends Component { constructor(props) { super(props); } // TODO: Make this component more generic to allow things other than W/L and hotkeys... static propTypes = { isOpen: PropTypes.bool.isRequired, onCancel: PropTypes.func, }; itemsPreset() { const { t } = this.props; const browser = detect(); const capitalize = s => s.substr(0, 1).toUpperCase() + s.substr(1).toLowerCase(); return [ { name: t('Repository URL'), value: 'https://github.com/OHIF/Viewers/', link: 'https://github.com/OHIF/Viewers/', }, { name: t('Latest Master Commits'), value: 'https://github.com/OHIF/Viewers/commits/master', link: 'https://github.com/OHIF/Viewers/commits/master', }, { name: 'Version Number', value: process.env.VERSION_NUMBER, }, { name: t('Build Number'), value: process.env.BUILD_NUM, }, { name: t('Browser'), value: `${capitalize(browser.name)} ${browser.version}`, }, { name: t('OS'), value: browser.os, }, ]; } static defaultProps = { isOpen: false, }; renderTableRow(item) { return (
| {t('Name')} | {t('Value')} |
|---|