2016-02-06 16:17:51 +05:30
|
|
|
import React, { Component, PropTypes } from 'react';
|
|
|
|
|
2016-05-20 00:59:14 +05:30
|
|
|
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-01-04 02:48:42 +05:30
|
|
|
|
2016-01-04 11:32:13 +05:30
|
|
|
import styles from './appInfo.scss';
|
2016-05-14 16:56:17 +05:30
|
|
|
import messages from './AppInfo.intl.json';
|
2016-02-06 16:17:51 +05:30
|
|
|
|
|
|
|
export default class AppInfo extends Component {
|
|
|
|
static displayName = 'AppInfo';
|
|
|
|
|
|
|
|
static propTypes = {
|
2016-03-13 14:06:31 +05:30
|
|
|
name: PropTypes.string,
|
|
|
|
description: PropTypes.string,
|
2016-02-06 16:17:51 +05:30
|
|
|
onGoToAuth: PropTypes.func.isRequired
|
|
|
|
};
|
2016-01-04 11:32:13 +05:30
|
|
|
|
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 (
|
2016-01-04 11:32:13 +05:30
|
|
|
<div className={styles.appInfo}>
|
|
|
|
<div className={styles.logoContainer}>
|
2016-05-20 00:59:14 +05:30
|
|
|
<h2 className={styles.logo}>
|
|
|
|
{name ? name : (
|
|
|
|
<Message {...messages.appName} />
|
|
|
|
)}
|
|
|
|
</h2>
|
2016-01-04 02:48:42 +05:30
|
|
|
</div>
|
2016-01-04 11:32:13 +05:30
|
|
|
<div className={styles.descriptionContainer}>
|
|
|
|
<p className={styles.description}>
|
|
|
|
{description}
|
2016-01-04 02:48:42 +05:30
|
|
|
</p>
|
|
|
|
</div>
|
2016-02-06 16:17:51 +05:30
|
|
|
<div className={styles.goToAuth}>
|
2016-05-14 16:56:17 +05:30
|
|
|
<Button onClick={onGoToAuth} label={messages.goToAuth} />
|
2016-02-06 16:17:51 +05:30
|
|
|
</div>
|
2016-05-20 01:11:43 +05:30
|
|
|
|
|
|
|
<div className={styles.langMenu}>
|
|
|
|
<LangMenu />
|
|
|
|
</div>
|
2016-01-04 02:48:42 +05:30
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|