import React from 'react'; import PropTypes from 'prop-types'; import { I18n } from '@lingui/react'; import { Trans, t } from '@lingui/macro'; import { AboutModal, TextContent, TextList, TextListItem } from '@patternfly/react-core'; import brandImg from '../../images/tower-logo-white.svg'; import logoImg from '../../images/tower-logo-login.svg'; class About extends React.Component { static createSpeechBubble (version) { let text = `Tower ${version}`; let top = ''; let bottom = ''; for (let i = 0; i < text.length; i++) { top += '_'; bottom += '-'; } top = ` __${top}__ \n`; text = `< ${text} >\n`; bottom = ` --${bottom}-- `; return top + text + bottom; } constructor (props) { super(props); this.createSpeechBubble = this.constructor.createSpeechBubble.bind(this); } render () { const { ansible_version, version, isOpen, onClose } = this.props; const speechBubble = this.createSpeechBubble(version); return ( {({ i18n }) => (
              { speechBubble }
              {`
              \\
              \\   ^__^
                  (oo)\\_______
                  (__)      A )\\
                      ||----w |
                      ||     ||
                        `}
            
Ansible Version { ansible_version }
)}
); } } About.propTypes = { ansible_version: PropTypes.string, isOpen: PropTypes.bool, onClose: PropTypes.func.isRequired, version: PropTypes.string, }; About.defaultProps = { ansible_version: null, isOpen: false, version: null, }; export default About;