accounts-frontend/src/components/auth/appInfo/AppInfo.jsx

67 lines
2.3 KiB
React
Raw Normal View History

import React, { Component, PropTypes } from 'react';
import { FormattedMessage as Message } from 'react-intl';
2016-05-14 16:56:17 +05:30
import { Button } from 'components/ui/form';
2016-05-20 01:11:43 +05:30
import { LangMenu } from 'components/langMenu';
2016-05-22 22:55:38 +05:30
import { FooterMenu } from 'components/footerMenu';
2016-01-04 02:48:42 +05:30
import styles from './appInfo.scss';
2016-05-14 16:56:17 +05:30
import messages from './AppInfo.intl.json';
export default class AppInfo extends Component {
static displayName = 'AppInfo';
static propTypes = {
name: PropTypes.string,
description: PropTypes.string,
onGoToAuth: PropTypes.func.isRequired
};
2016-01-04 02:48:42 +05:30
render() {
2016-05-14 16:56:17 +05:30
const { name, description, onGoToAuth } = this.props;
2016-01-04 02:48:42 +05:30
return (
<div className={styles.appInfo}>
<div className={styles.logoContainer}>
<h2 className={styles.logo}>
{name ? name : (
<Message {...messages.appName} />
)}
</h2>
2016-01-04 02:48:42 +05:30
</div>
<div className={styles.descriptionContainer}>
{description ? (
<p className={styles.description}>
{description}
</p>
) : (
<div>
<p className={styles.description}>
<Message {...messages.appDescription} />
</p>
<p className={styles.description}>
<Message {...messages.useItYourself} values={{
link: (
<a href="http://docs.ely.by/oauth.html">
<Message {...messages.documentation} />
</a>
)
}} />
</p>
</div>
)}
2016-01-04 02:48:42 +05:30
</div>
<div className={styles.goToAuth}>
2016-05-14 16:56:17 +05:30
<Button onClick={onGoToAuth} label={messages.goToAuth} />
</div>
2016-05-20 01:11:43 +05:30
<div className={styles.langMenu}>
2016-05-22 22:55:38 +05:30
<FooterMenu skin="light" />
2016-05-20 01:11:43 +05:30
<LangMenu />
</div>
2016-01-04 02:48:42 +05:30
</div>
);
}
}