1 line
4.3 KiB
Plaintext
1 line
4.3 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/lists/index.js"],"names":["messages","defineMessages","heading","subheading","getOrderedLists","createSelector","state","get","lists","toList","filter","item","sort","a","b","localeCompare","Lists","connect","injectIntl","componentWillMount","this","props","dispatch","fetchLists","render","intl","emptyMessage","id","defaultMessage","icon","formatMessage","text","scrollKey","map","list","to","ImmutablePureComponent","params","PropTypes","object","isRequired","func","ImmutablePropTypes"],"mappings":"wTAgBMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,0CACPC,WAAW,CAAD,qDAGNC,EAAkBC,YAAe,CAAC,SAAAC,GAAK,OAAIA,EAAMC,IAAI,WAAW,SAAAC,GACpE,OAAKA,EAIEA,EAAMC,SAASC,OAAO,SAAAC,GAAI,QAAMA,IAAMC,KAAK,SAACC,EAAGC,GAAJ,OAAUD,EAAEN,IAAI,SAASQ,cAAcD,EAAEP,IAAI,YAHtFC,IAYLQ,EAFUC,kBAJQ,SAAAX,GAAK,MAAK,CAChCE,MAAOJ,EAAgBE,K,GAIxBY,a,8GAUCC,mBAAA,WACEC,KAAKC,MAAMC,SAASC,gB,EAGtBC,OAAA,WAAW,IAAD,EACgBJ,KAAKC,MAArBI,EADA,EACAA,KAAMjB,EADN,EACMA,MAEd,IAAKA,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMkB,EAAe,YAAC,IAAD,CAAkBC,GAAG,qBAAqBC,eAAe,6EAE9E,OACE,YAAC,IAAD,CAAQC,KAAK,OAAO3B,QAASuB,EAAKK,cAAc9B,EAASE,eAAzD,EACE,YAAC,IAAD,IAEA,YAAC,IAAD,IAEA,YAAC,IAAD,CAAkB6B,KAAMN,EAAKK,cAAc9B,EAASG,cACpD,YAAC,IAAD,CACE6B,UAAU,QACVN,aAAcA,QAFhB,EAIGlB,EAAMyB,IAAI,SAAAC,GAAI,OACb,YAAC,IAAD,CAAiCC,GAAE,mBAAqBD,EAAK3B,IAAI,MAASsB,KAAK,UAAUE,KAAMG,EAAK3B,IAAI,UAAvF2B,EAAK3B,IAAI,Y,GAtClB6B,K,0BAEC,CACjBC,OAAQC,IAAUC,OAAOC,WACzBlB,SAAUgB,IAAUG,KAAKD,WACzBhC,MAAOkC,IAAmBR,KAC1BT,KAAMa,IAAUC,OAAOC,a","file":"flavours/glitch/async/lists.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport LoadingIndicator from 'flavours/glitch/components/loading_indicator';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim';\nimport { fetchLists } from 'flavours/glitch/actions/lists';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ColumnLink from 'flavours/glitch/features/ui/components/column_link';\nimport ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading';\nimport NewListForm from './components/new_list_form';\nimport { createSelector } from 'reselect';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\n\nconst messages = defineMessages({\n heading: { id: 'column.lists', defaultMessage: 'Lists' },\n subheading: { id: 'lists.subheading', defaultMessage: 'Your lists' },\n});\n\nconst getOrderedLists = createSelector([state => state.get('lists')], lists => {\n if (!lists) {\n return lists;\n }\n\n return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')));\n});\n\nconst mapStateToProps = state => ({\n lists: getOrderedLists(state),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Lists extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n lists: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchLists());\n }\n\n render () {\n const { intl, lists } = this.props;\n\n if (!lists) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n const emptyMessage = <FormattedMessage id='empty_column.lists' defaultMessage=\"You don't have any lists yet. When you create one, it will show up here.\" />;\n\n return (\n <Column icon='bars' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n\n <NewListForm />\n\n <ColumnSubheading text={intl.formatMessage(messages.subheading)} />\n <ScrollableList\n scrollKey='lists'\n emptyMessage={emptyMessage}\n >\n {lists.map(list =>\n <ColumnLink key={list.get('id')} to={`/timelines/list/${list.get('id')}`} icon='list-ul' text={list.get('title')} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |