You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.3 KiB

  1. import Column from '../ui/components/column';
  2. import ColumnLink from '../ui/components/column_link';
  3. import { Link } from 'react-router';
  4. import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
  5. import { connect } from 'react-redux';
  6. const messages = defineMessages({
  7. heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' },
  8. public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Public timeline' },
  9. settings: { id: 'navigation_bar.settings', defaultMessage: 'Settings' },
  10. follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' }
  11. });
  12. const mapStateToProps = state => ({
  13. me: state.getIn(['meta', 'me'])
  14. });
  15. const hamburgerStyle = {
  16. background: '#373b4a',
  17. color: '#fff',
  18. fontSize: '16px',
  19. padding: '15px',
  20. position: 'absolute',
  21. right: '0',
  22. top: '-48px',
  23. cursor: 'default'
  24. };
  25. const GettingStarted = ({ intl, me }) => {
  26. return (
  27. <Column icon='asterisk' heading={intl.formatMessage(messages.heading)}>
  28. <div style={{ position: 'relative' }}>
  29. <div style={hamburgerStyle}><i className='fa fa-bars' /></div>
  30. <ColumnLink icon='globe' text={intl.formatMessage(messages.public_timeline)} to='/timelines/public' />
  31. <ColumnLink icon='cog' text={intl.formatMessage(messages.settings)} href='/settings/profile' />
  32. <ColumnLink icon='users' text={intl.formatMessage(messages.follow_requests)} to='/follow_requests' />
  33. </div>
  34. <div className='static-content'>
  35. <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>
  36. <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>
  37. <p><FormattedMessage id='getting_started.about_developer' defaultMessage='The developer of this project can be followed as Gargron@mastodon.social' /></p>
  38. </div>
  39. </Column>
  40. );
  41. };
  42. GettingStarted.propTypes = {
  43. intl: React.PropTypes.object.isRequired,
  44. me: React.PropTypes.number
  45. };
  46. export default connect(mapStateToProps)(injectIntl(GettingStarted));