accounts-frontend/packages/app/components/auth/appInfo/AppInfo.tsx

64 lines
2.6 KiB
TypeScript
Raw Normal View History

2019-12-07 16:58:52 +05:30
import React from 'react';
import { defineMessages, FormattedMessage as Message } from 'react-intl';
import { Button } from 'app/components/ui/form';
import { FooterMenu } from 'app/components/footerMenu';
2016-01-04 02:48:42 +05:30
import appName from './appName.intl';
import styles from './appInfo.scss';
const messages = defineMessages({
goToAuth: 'Go to auth',
});
2019-12-07 16:58:52 +05:30
export default class AppInfo extends React.Component<{
2020-05-24 04:38:24 +05:30
name?: string;
description?: string;
onGoToAuth: () => void;
2017-08-23 02:01:41 +05:30
}> {
2020-05-24 04:38:24 +05:30
render() {
const { name, description, onGoToAuth } = this.props;
2016-01-04 02:48:42 +05:30
2020-05-24 04:38:24 +05:30
return (
<div className={styles.appInfo}>
<div className={styles.logoContainer}>
<h2 className={styles.logo}>{name ? name : <Message {...appName} />}</h2>
2020-05-24 04:38:24 +05:30
</div>
<div className={styles.descriptionContainer}>
{description ? (
<p className={styles.description}>{description}</p>
) : (
<div>
<p className={styles.description}>
<Message
key="appDescription"
defaultMessage="You are on the Ely.by authorization service, that allows you to safely perform any operations on your account. This single entry point for websites and desktop software, including game launchers."
/>
2020-05-24 04:38:24 +05:30
</p>
<p className={styles.description}>
<Message
key="useItYourself"
defaultMessage="Visit our {link}, to learn how to use this service in you projects."
2020-05-24 04:38:24 +05:30
values={{
link: (
<a href="http://docs.ely.by/oauth.html">
<Message key="documentation" defaultMessage="documentation" />
2020-05-24 04:38:24 +05:30
</a>
),
}}
/>
</p>
</div>
)}
</div>
<div className={styles.goToAuth}>
<Button onClick={onGoToAuth} label={messages.goToAuth} />
</div>
2020-05-24 04:38:24 +05:30
<div className={styles.footer}>
<FooterMenu />
</div>
</div>
);
}
2016-01-04 02:48:42 +05:30
}