spc-pleroma/priv/static/packs/flavours/glitch/async/onboarding_modal.js.map

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":["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_drawer_account__WEBPACK_IMPORTED_MODULE_11__","account","flavours_glitch_features_composer__WEBPACK_IMPORTED_MODULE_10__","privacy","text","PageThree","_ref3","flavours_glitch_features_drawer_search__WEBPACK_IMPORTED_MODULE_12__","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_1__","_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,EAAWC,YAAe,CAC9BC,WAAU,CAAAC,GAAA,cAAAC,eAAA,QACVC,oBAAmB,CAAAF,GAAA,uBAAAC,eAAA,iBACnBE,YAAW,CAAAH,GAAA,mBAAAC,eAAA,kBACX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IAAI,SAACC,EAAMpC,GAChB,IAAMtD,EAAY2F,IAAW,kCAAmC,CAC9DC,0CAA2CtC,IAAMN,IAEnD,OACElD,OAAAC,EAAA,EAAAD,CAAA,OAAaE,UAAWA,GAAdsD,EAA0BoC,MAK1C5F,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,oCAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,gBACEA,OAAAC,EAAA,EAAAD,CAAA,UACEqF,QAAST,KAAKmB,WACd7F,UAAU,qDAFZ,EAIEF,OAAAC,EAAA,EAAAD,CAACK,EAAA,EAAD,CAAkBd,GAAG,kBAAkBC,eAAe,WAI1DQ,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,+BAAf,EACG8D,EAAM2B,IAAI,SAACK,EAAGxC,GACb,IAAMtD,EAAY2F,IAAW,wBAAyB,CACpDI,OAAQzC,IAAMN,IAEhB,OACElD,OAAAC,EAAA,EAAAD,CAAA,OAEEkG,KAAK,SACLC,SAAS,IACTC,aAAY5C,EACZ6B,QAASF,EAAKkB,UACdnG,UAAWA,GANb,OACcsD,MAWpBxD,OAAAC,EAAA,EAAAD,CAAA,gBACGoF,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 { WrappedComponent as RawComposer } from 'flavours/glitch/features/composer';\nimport DrawerAccount from 'flavours/glitch/features/drawer/account';\nimport DrawerSearch from 'flavours/glitch/features/drawer/search';\nimport ColumnHeader from './column_header';\nimport { me } from 'flavours/glitch/util/initial_state';\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 <RawComposer\n intl={intl}\n privacy='public'\n text='Awoo! #introductions'\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 <DrawerSearch intl={intl} />\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":""}