2016-11-16 08:20:52 -08:00
import Column from '../ui/components/column' ;
2016-12-12 05:27:52 -08:00
import ColumnLink from '../ui/components/column_link' ;
2016-10-07 15:30:56 -07:00
import { Link } from 'react-router' ;
2016-12-12 05:27:52 -08:00
import { defineMessages , injectIntl , FormattedMessage } from 'react-intl' ;
import { connect } from 'react-redux' ;
2016-12-26 12:55:52 -08:00
import ImmutablePropTypes from 'react-immutable-proptypes' ;
2016-10-07 07:00:11 -07:00
2016-12-12 05:27:52 -08:00
const messages = defineMessages ( {
heading : { id : 'getting_started.heading' , defaultMessage : 'Getting started' } ,
public _timeline : { id : 'navigation_bar.public_timeline' , defaultMessage : 'Public timeline' } ,
2016-12-26 12:33:51 -08:00
settings : { id : 'navigation_bar.settings' , defaultMessage : 'Settings' } ,
follow _requests : { id : 'navigation_bar.follow_requests' , defaultMessage : 'Follow requests' }
2016-12-12 05:27:52 -08:00
} ) ;
const mapStateToProps = state => ( {
2016-12-26 12:55:52 -08:00
me : state . getIn ( [ 'accounts' , state . getIn ( [ 'meta' , 'me' ] ) ] )
2016-12-12 05:27:52 -08:00
} ) ;
const hamburgerStyle = {
background : '#373b4a' ,
color : '#fff' ,
fontSize : '16px' ,
padding : '15px' ,
position : 'absolute' ,
right : '0' ,
top : '-48px' ,
cursor : 'default'
} ;
const GettingStarted = ( { intl , me } ) => {
2016-12-26 12:55:52 -08:00
let followRequests = '' ;
if ( me . get ( 'locked' ) ) {
followRequests = < ColumnLink icon = 'users' text = { intl . formatMessage ( messages . follow _requests ) } to = '/follow_requests' / > ;
}
2016-10-06 13:47:35 -07:00
return (
2016-12-12 05:27:52 -08:00
< Column icon = 'asterisk' heading = { intl . formatMessage ( messages . heading ) } >
< div style = { { position : 'relative' } } >
< div style = { hamburgerStyle } > < i className = 'fa fa-bars' / > < / div >
< ColumnLink icon = 'globe' text = { intl . formatMessage ( messages . public _timeline ) } to = '/timelines/public' / >
< ColumnLink icon = 'cog' text = { intl . formatMessage ( messages . settings ) } href = '/settings/profile' / >
2016-12-26 12:55:52 -08:00
{ followRequests }
2016-12-12 05:27:52 -08:00
< / div >
2016-10-07 07:00:11 -07:00
< div className = 'static-content' >
2016-11-16 08:20:52 -08:00
< p > < FormattedMessage id = 'getting_started.about_addressing' defaultMessage = 'You can follow people if you know their username and the domain they are on by entering an e-mail-esque address into the form at the top of the sidebar.' / > < / p >
< p > < FormattedMessage id = 'getting_started.about_shortcuts' defaultMessage = 'If the target user is on the same domain as you, just the username will work. The same rule applies to mentioning people in statuses.' / > < / p >
< p > < FormattedMessage id = 'getting_started.about_developer' defaultMessage = 'The developer of this project can be followed as Gargron@mastodon.social' / > < / p >
2016-10-07 07:00:11 -07:00
< / div >
2016-12-27 14:30:11 -08:00
< div className = 'getting-started__illustration' / >
2016-10-07 07:00:11 -07:00
< / Column >
2016-10-06 13:47:35 -07:00
) ;
} ;
2016-12-26 12:33:51 -08:00
GettingStarted . propTypes = {
intl : React . PropTypes . object . isRequired ,
2016-12-26 12:55:52 -08:00
me : ImmutablePropTypes . map . isRequired
2016-12-26 12:33:51 -08:00
} ;
2016-12-12 05:27:52 -08:00
export default connect ( mapStateToProps ) ( injectIntl ( GettingStarted ) ) ;