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.

55 lines
3.0 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. import ImmutablePropTypes from 'react-immutable-proptypes';
  7. const messages = defineMessages({
  8. heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' },
  9. public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Public timeline' },
  10. preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
  11. follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
  12. sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Sign out' },
  13. favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }
  14. });
  15. const mapStateToProps = state => ({
  16. me: state.getIn(['accounts', state.getIn(['meta', 'me'])])
  17. });
  18. const GettingStarted = ({ intl, me }) => {
  19. let followRequests = '';
  20. if (me.get('locked')) {
  21. followRequests = <ColumnLink icon='users' text={intl.formatMessage(messages.follow_requests)} to='/follow_requests' />;
  22. }
  23. return (
  24. <Column icon='asterisk' heading={intl.formatMessage(messages.heading)}>
  25. <div style={{ position: 'relative' }}>
  26. <ColumnLink icon='globe' text={intl.formatMessage(messages.public_timeline)} to='/timelines/public' />
  27. <ColumnLink icon='cog' text={intl.formatMessage(messages.preferences)} href='/settings/preferences' />
  28. <ColumnLink icon='star' text={intl.formatMessage(messages.favourites)} to='/favourites' />
  29. {followRequests}
  30. <ColumnLink icon='sign-out' text={intl.formatMessage(messages.sign_out)} href='/auth/sign_out' method='delete' />
  31. </div>
  32. <div className='scrollable optionally-scrollable'>
  33. <div className='static-content getting-started'>
  34. <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>
  35. <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>
  36. <p><FormattedMessage id='getting_started.about_developer' defaultMessage='The developer of this project can be followed as Gargron@mastodon.social' /></p>
  37. <p><FormattedMessage id='getting_started.open_source_notice' defaultMessage='Mastodon is open source software. You can contribute or report issues on github at {github}' values={{ github: <a style={{ color: '#616b86'}} href="https://github.com/tootsuite/mastodon">tootsuite/mastodon</a> }} /></p>
  38. </div>
  39. </div>
  40. </Column>
  41. );
  42. };
  43. GettingStarted.propTypes = {
  44. intl: React.PropTypes.object.isRequired,
  45. me: ImmutablePropTypes.map.isRequired
  46. };
  47. export default connect(mapStateToProps)(injectIntl(GettingStarted));