pleroma/priv/static/packs/features/getting_started.js.map
Haelwenn (lanodan) Monnier 2a850abbeb
MastoFE: Bundle 2020-01-20
2020-02-29 06:41:13 +01:00

1 line
No EOL
19 KiB
Text

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/ui/components/link_footer.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/getting_started/index.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/getting_started/components/trends.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/getting_started/containers/trends_container.js"],"names":["messages","defineMessages","logoutMessage","logoutConfirm","LinkFooter","connect","dispatch","intl","onLogout","openModal","message","formatMessage","confirm","onConfirm","logOut","injectIntl","e","preventDefault","stopPropagation","props","render","withHotkeys","this","className","invitesEnabled","href","target","id","defaultMessage","to","onClick","handleLogoutClick","values","github","source_url","rel","repository","version","React","PureComponent","home_timeline","notifications","public_timeline","settings_subheading","community_timeline","direct","bookmarks","preferences","follow_requests","favourites","blocks","domain_blocks","mutes","pins","lists","discover","personal","security","menu","profile_directory","GettingStarted","state","myAccount","getIn","me","unreadFollowRequests","ImmutableList","size","fetchFollowRequests","componentDidMount","multiColumn","window","innerWidth","context","router","history","replace","number","limit","navItems","i","height","push","text","icon","get","badge","bindToDocument","label","fixedWidth","style","account","showTrends","ImmutablePureComponent","PropTypes","object","isRequired","ImmutablePropTypes","map","columns","list","bool","func","unreadNotifications","Trends","fetchTrends","refreshInterval","setInterval","componentWillUnmount","clearInterval","trends","isEmpty","take","hashtag","loading"],"mappings":"kOASMA,EAAWC,YAAe,CAC9BC,cAAc,CAAD,sFACbC,cAAc,CAAD,8DAeTC,G,EADLC,kBAAQ,MAXkB,SAACC,EAAD,OAAaC,EAAb,EAAaA,KAAb,MAAyB,CAClDC,SADkD,WAEhDF,EAASG,YAAU,UAA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EAAWxF,KAAKH,MAAhB2F,OAER,OAAKA,GAAUA,EAAOC,UACb,KAIP,mBAAKxF,UAAU,gCAAf,EACE,2BAAI,YAAC,IAAD,CAAkBI,GAAG,sBAAsBC,eAAe,kBAE7DkF,EAAOE,KAAK,GAAGd,KAAI,SAAAe,GAAO,OAAI,YAAC,IAAD,CAAmCA,QAASA,GAA9BA,EAAQ5B,IAAI,c,GAjC7BQ,K,YAAfW,E,eAEG,CACpBU,SAAS,I,YAHQV,E,YAMA,CACjBM,OAAQb,IAAmBG,KAC3BK,YAAaX,IAAUQ,KAAKN,aCHjB3F,uBARS,SAAAwD,GAAK,MAAK,CAChCiD,OAAQjD,EAAME,MAAM,CAAC,SAAU,cAGN,SAAAzD,GAAQ,MAAK,CACtCmG,YAAa,kBAAMnG,EAASmG,mBAGfpG,CAA6CmG","file":"features/getting_started.js","sourcesContent":["import { connect } from 'react-redux';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport { invitesEnabled, version, repository, source_url } from 'mastodon/initial_state';\nimport { logOut } from 'mastodon/utils/log_out';\nimport { openModal } from 'mastodon/actions/modal';\n\nconst messages = defineMessages({\n logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },\n logoutConfirm: { id: 'confirmations.logout.confirm', defaultMessage: 'Log out' },\n});\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n onLogout () {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.logoutMessage),\n confirm: intl.formatMessage(messages.logoutConfirm),\n onConfirm: () => logOut(),\n }));\n },\n});\n\nexport default @injectIntl\n@connect(null, mapDispatchToProps)\nclass LinkFooter extends React.PureComponent {\n\n static propTypes = {\n withHotkeys: PropTypes.bool,\n onLogout: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n handleLogoutClick = e => {\n e.preventDefault();\n e.stopPropagation();\n\n this.props.onLogout();\n\n return false;\n }\n\n render () {\n const { withHotkeys } = this.props;\n\n return (\n <div className='getting-started__footer'>\n <ul>\n {invitesEnabled && <li><a href='/invites' target='_blank'><FormattedMessage id='getting_started.invite' defaultMessage='Invite people' /></a> · </li>}\n {withHotkeys && <li><Link to='/keyboard-shortcuts'><FormattedMessage id='navigation_bar.keyboard_shortcuts' defaultMessage='Hotkeys' /></Link> · </li>}\n <li><a href='/auth/edit'><FormattedMessage id='getting_started.security' defaultMessage='Security' /></a> · </li>\n <li><a href='/about/more' target='_blank'><FormattedMessage id='navigation_bar.info' defaultMessage='About this server' /></a> · </li>\n <li><a href='https://joinmastodon.org/apps' target='_blank'><FormattedMessage id='navigation_bar.apps' defaultMessage='Mobile apps' /></a> · </li>\n <li><a href='/terms' target='_blank'><FormattedMessage id='getting_started.terms' defaultMessage='Terms of service' /></a> · </li>\n <li><a href='/settings/applications' target='_blank'><FormattedMessage id='getting_started.developers' defaultMessage='Developers' /></a> · </li>\n <li><a href='https://docs.joinmastodon.org' target='_blank'><FormattedMessage id='getting_started.documentation' defaultMessage='Documentation' /></a> · </li>\n <li><a href='/auth/sign_out' onClick={this.handleLogoutClick}><FormattedMessage id='navigation_bar.logout' defaultMessage='Logout' /></a></li>\n </ul>\n\n <p>\n <FormattedMessage\n id='getting_started.open_source_notice'\n defaultMessage='Mastodon is open source software. You can contribute or report issues on GitHub at {github}.'\n values={{ github: <span><a href={source_url} rel='noopener noreferrer' target='_blank'>{repository}</a> (v{version})</span> }}\n />\n </p>\n </div>\n );\n }\n\n};\n","import React from 'react';\nimport Column from '../ui/components/column';\nimport ColumnLink from '../ui/components/column_link';\nimport ColumnSubheading from '../ui/components/column_subheading';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { me, profile_directory, showTrends } from '../../initial_state';\nimport { fetchFollowRequests } from 'mastodon/actions/accounts';\nimport { List as ImmutableList } from 'immutable';\nimport NavigationBar from '../compose/components/navigation_bar';\nimport Icon from 'mastodon/components/icon';\nimport LinkFooter from 'mastodon/features/ui/components/link_footer';\nimport TrendsContainer from './containers/trends_container';\n\nconst messages = defineMessages({\n home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' },\n notifications: { id: 'tabs_bar.notifications', defaultMessage: 'Notifications' },\n public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },\n settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' },\n community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },\n direct: { id: 'navigation_bar.direct', defaultMessage: 'Direct messages' },\n bookmarks: { id: 'navigation_bar.bookmarks', defaultMessage: 'Bookmarks' },\n preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },\n follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },\n favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },\n blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },\n domain_blocks: { id: 'navigation_bar.domain_blocks', defaultMessage: 'Hidden domains' },\n mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },\n pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' },\n lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' },\n discover: { id: 'navigation_bar.discover', defaultMessage: 'Discover' },\n personal: { id: 'navigation_bar.personal', defaultMessage: 'Personal' },\n security: { id: 'navigation_bar.security', defaultMessage: 'Security' },\n menu: { id: 'getting_started.heading', defaultMessage: 'Getting started' },\n profile_directory: { id: 'getting_started.directory', defaultMessage: 'Profile directory' },\n});\n\nconst mapStateToProps = state => ({\n myAccount: state.getIn(['accounts', me]),\n unreadFollowRequests: state.getIn(['user_lists', 'follow_requests', 'items'], ImmutableList()).size,\n});\n\nconst mapDispatchToProps = dispatch => ({\n fetchFollowRequests: () => dispatch(fetchFollowRequests()),\n});\n\nconst badgeDisplay = (number, limit) => {\n if (number === 0) {\n return undefined;\n } else if (limit && number >= limit) {\n return `${limit}+`;\n } else {\n return number;\n }\n};\n\nconst NAVIGATION_PANEL_BREAKPOINT = 600 + (285 * 2) + (10 * 2);\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass GettingStarted extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object.isRequired,\n };\n\n static propTypes = {\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n columns: ImmutablePropTypes.list,\n multiColumn: PropTypes.bool,\n fetchFollowRequests: PropTypes.func.isRequired,\n unreadFollowRequests: PropTypes.number,\n unreadNotifications: PropTypes.number,\n };\n\n componentDidMount () {\n const { fetchFollowRequests, multiColumn } = this.props;\n\n if (!multiColumn && window.innerWidth >= NAVIGATION_PANEL_BREAKPOINT) {\n this.context.router.history.replace('/timelines/home');\n return;\n }\n\n fetchFollowRequests();\n }\n\n render () {\n const { intl, myAccount, multiColumn, unreadFollowRequests } = this.props;\n\n const navItems = [];\n let i = 1;\n let height = (multiColumn) ? 0 : 60;\n\n if (multiColumn) {\n navItems.push(\n <ColumnSubheading key={i++} text={intl.formatMessage(messages.discover)} />,\n <ColumnLink key={i++} icon='users' text={intl.formatMessage(messages.community_timeline)} to='/timelines/public/local' />,\n <ColumnLink key={i++} icon='globe' text={intl.formatMessage(messages.public_timeline)} to='/timelines/public' />,\n );\n\n height += 34 + 48*2;\n\n if (profile_directory) {\n navItems.push(\n <ColumnLink key={i++} icon='address-book' text={intl.formatMessage(messages.profile_directory)} to='/directory' />\n );\n\n height += 48;\n }\n\n navItems.push(\n <ColumnSubheading key={i++} text={intl.formatMessage(messages.personal)} />\n );\n\n height += 34;\n } else if (profile_directory) {\n navItems.push(\n <ColumnLink key={i++} icon='address-book' text={intl.formatMessage(messages.profile_directory)} to='/directory' />\n );\n\n height += 48;\n }\n\n navItems.push(\n <ColumnLink key={i++} icon='envelope' text={intl.formatMessage(messages.direct)} to='/timelines/direct' />,\n <ColumnLink key={i++} icon='bookmark' text={intl.formatMessage(messages.bookmarks)} to='/bookmarks' />,\n <ColumnLink key={i++} icon='star' text={intl.formatMessage(messages.favourites)} to='/favourites' />,\n <ColumnLink key={i++} icon='list-ul' text={intl.formatMessage(messages.lists)} to='/lists' />\n );\n\n height += 48*4;\n\n if (myAccount.get('locked') || unreadFollowRequests > 0) {\n navItems.push(<ColumnLink key={i++} icon='user-plus' text={intl.formatMessage(messages.follow_requests)} badge={badgeDisplay(unreadFollowRequests, 40)} to='/follow_requests' />);\n height += 48;\n }\n\n if (!multiColumn) {\n navItems.push(\n <ColumnSubheading key={i++} text={intl.formatMessage(messages.settings_subheading)} />,\n <ColumnLink key={i++} icon='gears' text={intl.formatMessage(messages.preferences)} href='/settings/preferences' />,\n );\n\n height += 34 + 48;\n }\n\n return (\n <Column bindToDocument={!multiColumn} label={intl.formatMessage(messages.menu)}>\n {multiColumn && <div className='column-header__wrapper'>\n <h1 className='column-header'>\n <button>\n <Icon id='bars' className='column-header__icon' fixedWidth />\n <FormattedMessage id='getting_started.heading' defaultMessage='Getting started' />\n </button>\n </h1>\n </div>}\n\n <div className='getting-started'>\n <div className='getting-started__wrapper' style={{ height }}>\n {!multiColumn && <NavigationBar account={myAccount} />}\n {navItems}\n </div>\n\n {!multiColumn && <div className='flex-spacer' />}\n\n <LinkFooter withHotkeys={multiColumn} />\n </div>\n\n {multiColumn && showTrends && <TrendsContainer />}\n </Column>\n );\n }\n\n}\n","import React from 'react';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Hashtag from 'mastodon/components/hashtag';\nimport { FormattedMessage } from 'react-intl';\n\nexport default class Trends extends ImmutablePureComponent {\n\n static defaultProps = {\n loading: false,\n };\n\n static propTypes = {\n trends: ImmutablePropTypes.list,\n fetchTrends: PropTypes.func.isRequired,\n };\n\n componentDidMount () {\n this.props.fetchTrends();\n this.refreshInterval = setInterval(() => this.props.fetchTrends(), 900 * 1000);\n }\n\n componentWillUnmount () {\n if (this.refreshInterval) {\n clearInterval(this.refreshInterval);\n }\n }\n\n render () {\n const { trends } = this.props;\n\n if (!trends || trends.isEmpty()) {\n return null;\n }\n\n return (\n <div className='getting-started__trends'>\n <h4><FormattedMessage id='trends.trending_now' defaultMessage='Trending now' /></h4>\n\n {trends.take(3).map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)}\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport { fetchTrends } from '../../../actions/trends';\nimport Trends from '../components/trends';\n\nconst mapStateToProps = state => ({\n trends: state.getIn(['trends', 'items']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n fetchTrends: () => dispatch(fetchTrends()),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Trends);\n"],"sourceRoot":""}