2019-12-07 13:28:52 +02:00
import React from 'react' ;
2020-07-22 14:20:10 +03:00
import { FormattedMessage as Message } from 'react-intl' ;
2019-12-07 21:02:00 +02:00
import { Button } from 'app/components/ui/form' ;
import { FooterMenu } from 'app/components/footerMenu' ;
2016-01-03 23:18:42 +02:00
2020-06-04 19:41:27 +03:00
import appName from './appName.intl' ;
2016-01-04 08:02:13 +02:00
import styles from './appInfo.scss' ;
2020-06-04 19:41:27 +03:00
2019-12-07 13:28:52 +02:00
export default class AppInfo extends React . Component < {
2020-05-24 02:08:24 +03:00
name? : string ;
description? : string ;
onGoToAuth : ( ) = > void ;
2017-08-22 23:31:41 +03:00
} > {
2020-05-24 02:08:24 +03:00
render() {
const { name , description , onGoToAuth } = this . props ;
2016-01-03 23:18:42 +02:00
2020-05-24 02:08:24 +03:00
return (
< div className = { styles . appInfo } >
< div className = { styles . logoContainer } >
2020-06-04 19:41:27 +03:00
< h2 className = { styles . logo } > { name ? name : < Message { ...appName } / > } < / h2 >
2020-05-24 02:08:24 +03:00
< / div >
< div className = { styles . descriptionContainer } >
{ description ? (
< p className = { styles . description } > { description } < / p >
) : (
< div >
< p className = { styles . description } >
2020-06-04 19:41:27 +03:00
< 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 02:08:24 +03:00
< / p >
< p className = { styles . description } >
< Message
2020-06-04 19:41:27 +03:00
key = "useItYourself"
defaultMessage = "Visit our {link}, to learn how to use this service in you projects."
2020-05-24 02:08:24 +03:00
values = { {
link : (
< a href = "http://docs.ely.by/oauth.html" >
2020-06-04 19:41:27 +03:00
< Message key = "documentation" defaultMessage = "documentation" / >
2020-05-24 02:08:24 +03:00
< / a >
) ,
} }
/ >
< / p >
< / div >
) }
< / div >
< div className = { styles . goToAuth } >
2020-07-22 14:20:10 +03:00
< Button onClick = { onGoToAuth } >
< Message key = "goToAuth" defaultMessage = "Go to auth" / >
< / Button >
2020-05-24 02:08:24 +03:00
< / div >
2019-11-27 11:03:32 +02:00
2020-05-24 02:08:24 +03:00
< div className = { styles . footer } >
< FooterMenu / >
< / div >
< / div >
) ;
}
2016-01-03 23:18:42 +02:00
}