mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-20 00:20:59 +00:00
1 line
No EOL
15 KiB
Text
1 line
No EOL
15 KiB
Text
{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/getting_started/index.js"],"names":["messages","Object","react_intl__WEBPACK_IMPORTED_MODULE_8__","home_timeline","id","defaultMessage","notifications","public_timeline","settings_subheading","community_timeline","direct","preferences","follow_requests","favourites","blocks","domain_blocks","mutes","pins","lists","discover","personal","security","menu","GettingStarted","react_redux__WEBPACK_IMPORTED_MODULE_9__","state","myAccount","getIn","_initial_state__WEBPACK_IMPORTED_MODULE_13__","unreadFollowRequests","immutable__WEBPACK_IMPORTED_MODULE_16__","size","customPanelEnabled","customPanel","dispatch","fetchFollowRequests","_actions_accounts__WEBPACK_IMPORTED_MODULE_14__","fetchPanel","_actions_pleroma__WEBPACK_IMPORTED_MODULE_15__","fetchPleromaConfig","componentDidMount","_props","this","props","get","render","number","limit","_props2","intl","multiColumn","navItems","i","height","push","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","_ui_components_column_subheading__WEBPACK_IMPORTED_MODULE_7__","text","formatMessage","_ui_components_column_link__WEBPACK_IMPORTED_MODULE_6__","icon","to","badge","href","staticContent","dangerouslySetInnerHTML","__html","style","marginLeft","marginRight","rel","target","_ui_components_column__WEBPACK_IMPORTED_MODULE_5__","label","className","_compose_components_navigation_bar__WEBPACK_IMPORTED_MODULE_18__","account","invitesEnabled","react_router_dom__WEBPACK_IMPORTED_MODULE_17__","data-method","values","mastofe","mastodon","pleroma","react_immutable_pure_component__WEBPACK_IMPORTED_MODULE_12__","propTypes","prop_types__WEBPACK_IMPORTED_MODULE_10___default","a","object","isRequired","react_immutable_proptypes__WEBPACK_IMPORTED_MODULE_11___default","map","columns","list","bool","func","unreadNotifications","string"],"mappings":"8VAgBMA,EAAWC,OAAAC,EAAA,EAAAD,EACfE,eAAAC,GAAA,gBAAAC,eAAA,QACAC,eAAAF,GAAA,yBAAAC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ting_started.js","sourcesContent":["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, invitesEnabled } from '../../initial_state';\nimport { fetchFollowRequests } from '../../actions/accounts';\nimport { fetchPanel, fetchPleromaConfig } from '../../actions/pleroma';\nimport { List as ImmutableList } from 'immutable';\nimport { Link } from 'react-router-dom';\nimport NavigationBar from '../compose/components/navigation_bar';\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 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});\n\nconst mapStateToProps = state => ({\n myAccount: state.getIn(['accounts', me]),\n unreadFollowRequests: state.getIn(['user_lists', 'follow_requests', 'items'], ImmutableList()).size,\n customPanelEnabled: state.getIn(['custom_panel', 'enabled']),\n customPanel: state.getIn(['custom_panel', 'panel']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n fetchFollowRequests: () => dispatch(fetchFollowRequests()),\n fetchPanel: () => dispatch(fetchPanel()),\n fetchPleromaConfig: () => dispatch(fetchPleromaConfig()),\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\n@connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nexport default class GettingStarted extends ImmutablePureComponent {\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 fetchPanel: PropTypes.func.isRequired,\n fetchPleromaConfig: PropTypes.func.isRequired,\n unreadFollowRequests: PropTypes.number,\n unreadNotifications: PropTypes.number,\n customPanelEnabled: PropTypes.bool,\n customPanel: PropTypes.string.isRequired,\n };\n\n componentDidMount () {\n const { myAccount, fetchFollowRequests, fetchPleromaConfig, fetchPanel } = this.props;\n\n if (myAccount.get('locked')) {\n fetchFollowRequests();\n }\n\n fetchPleromaConfig();\n fetchPanel();\n }\n\n render () {\n const { intl, myAccount, multiColumn, unreadFollowRequests, customPanelEnabled, customPanel } = 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 <ColumnSubheading key={i++} text={intl.formatMessage(messages.personal)} />\n );\n\n height += 34*2 + 48*2;\n }\n\n navItems.push(\n <ColumnLink key={i++} icon='envelope' text={intl.formatMessage(messages.direct)} to='/timelines/direct' />,\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*3;\n\n if (myAccount.get('locked')) {\n navItems.push(<ColumnLink key={i++} icon='users' 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='/user-settings' />,\n );\n\n height += 34 + 48;\n }\n\n const dot = ' • ';\n const staticContent = (customPanelEnabled ? <div dangerouslySetInnerHTML={{__html: customPanel}} style={{marginLeft: -12, marginRight: -12}} /> :\n <p>\n <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/FAQ.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.faq' defaultMessage='FAQ' /></a>\n {dot}\n <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/User-guide.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.userguide' defaultMessage='User Guide' /></a>\n {dot}\n <a href='https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md' rel='noopener' target='_blank'><FormattedMessage id='getting_started.appsshort' defaultMessage='Apps' /></a>\n {dot}\n <a href='https://pleroma.social'><FormattedMessage id='getting_started.pleroma' defaultMessage='Pleroma' /></a>\n </p>\n );\n\n return (\n <Column label={intl.formatMessage(messages.menu)}>\n {multiColumn && <div className='column-header__wrapper'>\n <h1 className='column-header'>\n <button>\n <i className='fa fa-bars fa-fw column-header__icon' />\n <FormattedMessage id='getting_started.heading' defaultMessage='Getting started' />\n </button>\n </h1>\n </div>}\n\n <div className='getting-started__wrapper scrollable' style={{ height }}>\n {!multiColumn && <NavigationBar account={myAccount} />}\n {navItems}\n </div>\n\n {!multiColumn && <div className='flex-spacer' />}\n\n <div className='getting-started getting-started__panel scrollable'>\n {staticContent}\n </div>\n\n {!multiColumn && <div className='flex-spacer' />}\n\n <div className='getting-started__footer scrollable'>\n <ul>\n {invitesEnabled && <li><a href='/invites' target='_blank'><FormattedMessage id='getting_started.invite' defaultMessage='Invite people' /></a> · </li>}\n {multiColumn && <li><Link to='/keyboard-shortcuts'><FormattedMessage id='navigation_bar.keyboard_shortcuts' defaultMessage='Hotkeys' /></Link> · </li>}\n <li><a href='/auth/sign_out' data-method='delete'><FormattedMessage id='navigation_bar.logout' defaultMessage='Logout' /></a></li>\n </ul>\n <p>\n <FormattedMessage\n id='getting_started.mastofe_notice'\n defaultMessage='{mastofe} is libre software based on {mastodon} frontend adapted for {pleroma}.'\n values={{\n mastofe: <a href='https://git.pleroma.social/pleroma/mastofe' rel='noopener' target='_blank'>Mastofe</a>,\n mastodon: <a href='https://github.com/tootsuite/mastodon' rel='noopener' target='_blank'>Mastodon</a>,\n pleroma: <a href='https://pleroma.social' rel='noopener' target='_blank'>Pleroma</a>\n }}\n />\n </p>\n </div>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |