mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 12:59:24 +00:00
1 line
4.6 KiB
Plaintext
1 line
4.6 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/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","shouldUpdateScroll","multiColumn","emptyMessage","id","defaultMessage","bindToDocument","icon","formatMessage","scrollKey","prepend","text","map","list","to","ImmutablePureComponent","params","PropTypes","object","isRequired","func","ImmutablePropTypes","bool"],"mappings":"uUAgBA,IAAMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,0CACPC,WAAW,CAAD,qDAGNC,EAAkBC,YAAe,CAAC,SAAAC,GAAK,OAAIA,EAAMC,IAAI,YAAW,SAAAC,GACpE,OAAKA,EAIEA,EAAMC,SAASC,QAAO,SAAAC,GAAI,QAAMA,KAAMC,MAAK,SAACC,EAAGC,GAAJ,OAAUD,EAAEN,IAAI,SAASQ,cAAcD,EAAEP,IAAI,aAHtFC,KAYLQ,EAFUC,mBAJQ,SAAAX,GAAK,MAAK,CAChCE,MAAOJ,EAAgBE,M,GAIxBY,a,wHAWCC,mBAAA,WACEC,KAAKC,MAAMC,SAASC,gB,EAGtBC,OAAA,WAAW,IAAD,EACiDJ,KAAKC,MAAtDI,EADA,EACAA,KAAMC,EADN,EACMA,mBAAoBlB,EAD1B,EAC0BA,MAAOmB,EADjC,EACiCA,YAEzC,IAAKnB,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMoB,EAAe,YAAC,IAAD,CAAkBC,GAAG,qBAAqBC,eAAe,6EAE9E,OACE,YAAC,IAAD,CAAQC,gBAAiBJ,EAAaK,KAAK,UAAU9B,QAASuB,EAAKQ,cAAcjC,EAASE,eAA1F,EACE,YAAC,IAAD,IAEA,YAAC,IAAD,IAEA,YAAC,IAAD,CACEgC,UAAU,QACVR,mBAAoBA,EACpBE,aAAcA,EACdO,QAAS,YAAC,IAAD,CAAkBC,KAAMX,EAAKQ,cAAcjC,EAASG,cAC7D4B,gBAAiBJ,QALnB,EAOGnB,EAAM6B,KAAI,SAAAC,GAAI,OACb,YAAC,IAAD,CAAiCC,GAAE,mBAAqBD,EAAK/B,IAAI,MAASyB,KAAK,UAAUI,KAAME,EAAK/B,IAAI,UAAvF+B,EAAK/B,IAAI,c,GAzClBiC,K,0BAEC,CACjBC,OAAQC,IAAUC,OAAOC,WACzBtB,SAAUoB,IAAUG,KAAKD,WACzBpC,MAAOsC,IAAmBR,KAC1Bb,KAAMiB,IAAUC,OAAOC,WACvBjB,YAAae,IAAUK,O","file":"features/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 '../../components/loading_indicator';\nimport Column from '../ui/components/column';\nimport ColumnBackButtonSlim from '../../components/column_back_button_slim';\nimport { fetchLists } from '../../actions/lists';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ColumnLink from '../ui/components/column_link';\nimport ColumnSubheading from '../ui/components/column_subheading';\nimport NewListForm from './components/new_list_form';\nimport { createSelector } from 'reselect';\nimport ScrollableList from '../../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 multiColumn: PropTypes.bool,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchLists());\n }\n\n render () {\n const { intl, shouldUpdateScroll, lists, multiColumn } = 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 bindToDocument={!multiColumn} icon='list-ul' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n\n <NewListForm />\n\n <ScrollableList\n scrollKey='lists'\n shouldUpdateScroll={shouldUpdateScroll}\n emptyMessage={emptyMessage}\n prepend={<ColumnSubheading text={intl.formatMessage(messages.subheading)} />}\n bindToDocument={!multiColumn}\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":""} |