Pleroma/priv/static/packs/flavours/glitch/async/onboarding_modal.js.map
2019-06-26 21:06:28 +02:00

1 line
21 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.js"],"names":["noop","messages","defineMessages","home_title","id","defaultMessage","notifications_title","local_title","federated_title","PageOne","_ref","acct","domain","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_3__","className","style","flex","react_intl__WEBPACK_IMPORTED_MODULE_6__","values","handle","PageTwo","_ref2","intl","myAccount","flavours_glitch_features_compose_components_navigation_bar__WEBPACK_IMPORTED_MODULE_11__","account","flavours_glitch_features_compose_components_compose_form__WEBPACK_IMPORTED_MODULE_10__","privacy","text","spoilerText","suggestions","PageThree","_ref3","flavours_glitch_features_compose_components_search__WEBPACK_IMPORTED_MODULE_12__","value","onChange","onSubmit","onClear","onShow","illustration","flavours_glitch_components_permalink__WEBPACK_IMPORTED_MODULE_9__","to","href","introductions","PageFour","_ref4","_column_header__WEBPACK_IMPORTED_MODULE_13__","icon","type","formatMessage","marginBottom","PageSix","_ref5","admin","adminSection","get","guidelines","target","fork","rel","Mastodon","github","apps","OnboardingModal","connect","state","getIn","me","injectIntl","currentIndex","e","preventDefault","_this","props","onClose","i","Number","currentTarget","getAttribute","setState","_ref6","Math","max","pages","_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__","_ref7","min","length","index","_ref8","key","handlePrev","handleNext","componentWillMount","_this$props","this","componentDidMount","window","addEventListener","handleKeyUp","componentWillUnmount","render","_this2","nextOrDoneBtn","onClick","handleClose","react_swipeable_views__WEBPACK_IMPORTED_MODULE_7___default","a","onChangeIndex","handleSwipe","map","page","classNames","onboarding-modal__page__wrapper--active","handleSkip","_","active","role","tabIndex","data-index","handleDot","React","PureComponent"],"mappings":"iSAcMA,EAAO,aAEPC,EAAWC,YAAe,CAC9BC,WAAU,CAAAC,GAAA,cAAAC,eAAA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EAAAD,CAAC8F,EAAAC,EAAD,CAAqBnB,MAAOnB,EAAcuC,cAAeb,KAAKc,YAAa/F,UAAU,gCAArF,EACGqE,EAAM2B,IAAI,SAACC,EAAMpC,GAChB,IAAM7D,EAAYkG,IAAW,kCAAmC,CAC9DC,0CAA2CtC,IAAMN,IAEnD,OACEzD,OAAAC,EAAA,EAAAD,CAAA,OAAaE,UAAWA,GAAd6D,EAA0BoC,MAK1CnG,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,oCAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,gBACEA,OAAAC,EAAA,EAAAD,CAAA,UACE4F,QAAST,KAAKmB,WACdpG,UAAU,qDAFZ,EAIEF,OAAAC,EAAA,EAAAD,CAACK,EAAA,EAAD,CAAkBd,GAAG,kBAAkBC,eAAe,WAI1DQ,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,+BAAf,EACGqE,EAAM2B,IAAI,SAACK,EAAGxC,GACb,IAAM7D,EAAYkG,IAAW,wBAAyB,CACpDI,OAAQzC,IAAMN,IAEhB,OACEzD,OAAAC,EAAA,EAAAD,CAAA,OAEEyG,KAAK,SACLC,SAAS,IACTC,aAAY5C,EACZ6B,QAASF,EAAKkB,UACd1G,UAAWA,GANb,OACc6D,MAWpB/D,OAAAC,EAAA,EAAAD,CAAA,gBACG2F,SA3IgCkB,IAAMC","file":"flavours/glitch/async/onboarding_modal.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ReactSwipeableViews from 'react-swipeable-views';\nimport classNames from 'classnames';\nimport Permalink from 'flavours/glitch/components/permalink';\nimport ComposeForm from 'flavours/glitch/features/compose/components/compose_form';\nimport DrawerAccount from 'flavours/glitch/features/compose/components/navigation_bar';\nimport Search from 'flavours/glitch/features/compose/components/search';\nimport ColumnHeader from './column_header';\nimport { me } from 'flavours/glitch/util/initial_state';\n\nconst noop = () => { };\n\nconst messages = defineMessages({\n home_title: { id: 'column.home', defaultMessage: 'Home' },\n notifications_title: { id: 'column.notifications', defaultMessage: 'Notifications' },\n local_title: { id: 'column.community', defaultMessage: 'Local timeline' },\n federated_title: { id: 'column.public', defaultMessage: 'Federated timeline' },\n});\n\nconst PageOne = ({ acct, domain }) => (\n <div className='onboarding-modal__page onboarding-modal__page-one'>\n <div style={{ flex: '0 0 auto' }}>\n <div className='onboarding-modal__page-one__elephant-friend' />\n </div>\n\n <div>\n <h1><FormattedMessage id='onboarding.page_one.welcome' defaultMessage='Welcome to {domain}!' values={{ domain }} /></h1>\n <p><FormattedMessage id='onboarding.page_one.federation' defaultMessage='{domain} is an \"instance\" of Mastodon. Mastodon is a network of independent servers joining up to make one larger social network. We call these servers instances.' values={{ domain }} /></p>\n <p><FormattedMessage id='onboarding.page_one.handle' defaultMessage='You are on {domain}, so your full handle is {handle}' values={{ domain, handle: <strong>@{acct}@{domain}</strong> }} /></p>\n </div>\n </div>\n);\n\nPageOne.propTypes = {\n acct: PropTypes.string.isRequired,\n domain: PropTypes.string.isRequired,\n};\n\nconst PageTwo = ({ intl, myAccount }) => (\n <div className='onboarding-modal__page onboarding-modal__page-two'>\n <div className='figure non-interactive'>\n <div className='pseudo-drawer'>\n <DrawerAccount account={myAccount} />\n <ComposeForm\n privacy='public'\n text='Awoo! #introductions'\n spoilerText=''\n suggestions={ [] }\n />\n </div>\n </div>\n\n <p><FormattedMessage id='onboarding.page_two.compose' defaultMessage='Write posts from the compose column. You can upload images, change privacy settings, and add content warnings with the icons below.' /></p>\n </div>\n);\n\nPageTwo.propTypes = {\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n};\n\nconst PageThree = ({ intl, myAccount }) => (\n <div className='onboarding-modal__page onboarding-modal__page-three'>\n <div className='figure non-interactive'>\n <Search\n value=''\n onChange={noop}\n onSubmit={noop}\n onClear={noop}\n onShow={noop}\n />\n\n <div className='pseudo-drawer'>\n <DrawerAccount account={myAccount} />\n </div>\n </div>\n\n <p><FormattedMessage id='onboarding.page_three.search' defaultMessage='Use the search bar to find people and look at hashtags, such as {illustration} and {introductions}. To look for a person who is not on this instance, use their full handle.' values={{ illustration: <Permalink to='/timelines/tag/illustration' href='/tags/illustration'>#illustration</Permalink>, introductions: <Permalink to='/timelines/tag/introductions' href='/tags/introductions'>#introductions</Permalink> }} /></p>\n <p><FormattedMessage id='onboarding.page_three.profile' defaultMessage='Edit your profile to change your avatar, bio, and display name. There, you will also find other preferences.' /></p>\n </div>\n);\n\nPageThree.propTypes = {\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n};\n\nconst PageFour = ({ domain, intl }) => (\n <div className='onboarding-modal__page onboarding-modal__page-four'>\n <div className='onboarding-modal__page-four__columns'>\n <div className='row'>\n <div>\n <div className='figure non-interactive'><ColumnHeader icon='home' type={intl.formatMessage(messages.home_title)} /></div>\n <p><FormattedMessage id='onboarding.page_four.home' defaultMessage='The home timeline shows posts from people you follow.' /></p>\n </div>\n\n <div>\n <div className='figure non-interactive'><ColumnHeader icon='bell' type={intl.formatMessage(messages.notifications_title)} /></div>\n <p><FormattedMessage id='onboarding.page_four.notifications' defaultMessage='The notifications column shows when someone interacts with you.' /></p>\n </div>\n </div>\n\n <div className='row'>\n <div>\n <div className='figure non-interactive' style={{ marginBottom: 0 }}><ColumnHeader icon='users' type={intl.formatMessage(messages.local_title)} /></div>\n </div>\n\n <div>\n <div className='figure non-interactive' style={{ marginBottom: 0 }}><ColumnHeader icon='globe' type={intl.formatMessage(messages.federated_title)} /></div>\n </div>\n </div>\n\n <p><FormattedMessage id='onboarding.page_five.public_timelines' defaultMessage='The local timeline shows public posts from everyone on {domain}. The federated timeline shows public posts from everyone who people on {domain} follow. These are the Public Timelines, a great way to discover new people.' values={{ domain }} /></p>\n </div>\n </div>\n);\n\nPageFour.propTypes = {\n domain: PropTypes.string.isRequired,\n intl: PropTypes.object.isRequired,\n};\n\nconst PageSix = ({ admin, domain }) => {\n let adminSection = '';\n\n if (admin) {\n adminSection = (\n <p>\n <FormattedMessage id='onboarding.page_six.admin' defaultMessage=\"Your instance's admin is {admin}.\" values={{ admin: <Permalink href={admin.get('url')} to={`/accounts/${admin.get('id')}`}>@{admin.get('acct')}</Permalink> }} />\n <br />\n <FormattedMessage id='onboarding.page_six.read_guidelines' defaultMessage=\"Please read {domain}'s {guidelines}!\" values={{ domain, guidelines: <a href='/about/more' target='_blank'><FormattedMessage id='onboarding.page_six.guidelines' defaultMessage='community guidelines' /></a> }} />\n </p>\n );\n }\n\n return (\n <div className='onboarding-modal__page onboarding-modal__page-six'>\n <h1><FormattedMessage id='onboarding.page_six.almost_done' defaultMessage='Almost done...' /></h1>\n {adminSection}\n <p><FormattedMessage id='onboarding.page_six.github' defaultMessage='{domain} runs on Glitchsoc. Glitchsoc is a friendly {fork} of {Mastodon}. Glitchsoc is fully compatible with all Mastodon apps and instances. Glitchsoc is free open-source software. You can report bugs, request features, or contribute to the code on {github}.' values={{ domain, fork: <a href='https://en.wikipedia.org/wiki/Fork_(software_development)' target='_blank' rel='noopener'>fork</a>, Mastodon: <a href='https://github.com/tootsuite/mastodon' target='_blank' rel='noopener'>Mastodon</a>, github: <a href='https://github.com/glitch-soc/mastodon' target='_blank' rel='noopener'>GitHub</a> }} /></p>\n <p><FormattedMessage id='onboarding.page_six.apps_available' defaultMessage='There are {apps} available for iOS, Android and other platforms.' values={{ domain, apps: <a href='https://joinmastodon.org/apps' target='_blank' rel='noopener'><FormattedMessage id='onboarding.page_six.various_app' defaultMessage='mobile apps' /></a> }} /></p>\n <p><em><FormattedMessage id='onboarding.page_six.appetoot' defaultMessage='Bon Appetoot!' /></em></p>\n </div>\n );\n};\n\nPageSix.propTypes = {\n admin: ImmutablePropTypes.map,\n domain: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = state => ({\n myAccount: state.getIn(['accounts', me]),\n admin: state.getIn(['accounts', state.getIn(['meta', 'admin'])]),\n domain: state.getIn(['meta', 'domain']),\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class OnboardingModal extends React.PureComponent {\n\n static propTypes = {\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n domain: PropTypes.string.isRequired,\n admin: ImmutablePropTypes.map,\n };\n\n state = {\n currentIndex: 0,\n };\n\n componentWillMount() {\n const { myAccount, admin, domain, intl } = this.props;\n this.pages = [\n <PageOne acct={myAccount.get('acct')} domain={domain} />,\n <PageTwo myAccount={myAccount} intl={intl} />,\n <PageThree myAccount={myAccount} intl={intl} />,\n <PageFour domain={domain} intl={intl} />,\n <PageSix admin={admin} domain={domain} />,\n ];\n };\n\n componentDidMount() {\n window.addEventListener('keyup', this.handleKeyUp);\n }\n\n componentWillUnmount() {\n window.addEventListener('keyup', this.handleKeyUp);\n }\n\n handleSkip = (e) => {\n e.preventDefault();\n this.props.onClose();\n }\n\n handleDot = (e) => {\n const i = Number(e.currentTarget.getAttribute('data-index'));\n e.preventDefault();\n this.setState({ currentIndex: i });\n }\n\n handlePrev = () => {\n this.setState(({ currentIndex }) => ({\n currentIndex: Math.max(0, currentIndex - 1),\n }));\n }\n\n handleNext = () => {\n const { pages } = this;\n this.setState(({ currentIndex }) => ({\n currentIndex: Math.min(currentIndex + 1, pages.length - 1),\n }));\n }\n\n handleSwipe = (index) => {\n this.setState({ currentIndex: index });\n }\n\n handleKeyUp = ({ key }) => {\n switch (key) {\n case 'ArrowLeft':\n this.handlePrev();\n break;\n case 'ArrowRight':\n this.handleNext();\n break;\n }\n }\n\n handleClose = () => {\n this.props.onClose();\n }\n\n render () {\n const { pages } = this;\n const { currentIndex } = this.state;\n const hasMore = currentIndex < pages.length - 1;\n\n const nextOrDoneBtn = hasMore ? (\n <button\n onClick={this.handleNext}\n className='onboarding-modal__nav onboarding-modal__next'\n >\n <FormattedMessage id='onboarding.next' defaultMessage='Next' />\n </button>\n ) : (\n <button\n onClick={this.handleClose}\n className='onboarding-modal__nav onboarding-modal__done'\n >\n <FormattedMessage id='onboarding.done' defaultMessage='Done' />\n </button>\n );\n\n return (\n <div className='modal-root__modal onboarding-modal'>\n <ReactSwipeableViews index={currentIndex} onChangeIndex={this.handleSwipe} className='onboarding-modal__pager'>\n {pages.map((page, i) => {\n const className = classNames('onboarding-modal__page__wrapper', {\n 'onboarding-modal__page__wrapper--active': i === currentIndex,\n });\n return (\n <div key={i} className={className}>{page}</div>\n );\n })}\n </ReactSwipeableViews>\n\n <div className='onboarding-modal__paginator'>\n <div>\n <button\n onClick={this.handleSkip}\n className='onboarding-modal__nav onboarding-modal__skip'\n >\n <FormattedMessage id='onboarding.skip' defaultMessage='Skip' />\n </button>\n </div>\n\n <div className='onboarding-modal__dots'>\n {pages.map((_, i) => {\n const className = classNames('onboarding-modal__dot', {\n active: i === currentIndex,\n });\n return (\n <div\n key={`dot-${i}`}\n role='button'\n tabIndex='0'\n data-index={i}\n onClick={this.handleDot}\n className={className}\n />\n );\n })}\n </div>\n\n <div>\n {nextOrDoneBtn}\n </div>\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}