2019-12-07 16:58:52 +05:30
import React from 'react' ;
2020-07-22 16:50:10 +05:30
import { FormattedMessage as Message } from 'react-intl' ;
2019-12-08 00:32:00 +05:30
import { Button } from 'app/components/ui/form' ;
import { FooterMenu } from 'app/components/footerMenu' ;
2016-01-04 02:48:42 +05:30
2020-06-04 22:11:27 +05:30
import appName from './appName.intl' ;
2016-01-04 11:32:13 +05:30
import styles from './appInfo.scss' ;
2020-06-04 22:11:27 +05:30
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 } >
2020-06-04 22:11:27 +05:30
< 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 } >
2020-06-04 22:11:27 +05:30
< 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
2020-06-04 22:11:27 +05:30
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" >
2020-06-04 22:11:27 +05:30
< Message key = "documentation" defaultMessage = "documentation" / >
2020-05-24 04:38:24 +05:30
< / a >
) ,
} }
/ >
< / p >
< / div >
) }
< / div >
< div className = { styles . goToAuth } >
2020-07-22 16:50:10 +05:30
< Button onClick = { onGoToAuth } >
< Message key = "goToAuth" defaultMessage = "Go to auth" / >
< / Button >
2020-05-24 04:38:24 +05:30
< / div >
2019-11-27 14:33:32 +05:30
2020-05-24 04:38:24 +05:30
< div className = { styles . footer } >
< FooterMenu / >
< / div >
< / div >
) ;
}
2016-01-04 02:48:42 +05:30
}