mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-17 12:36:11 +00:00
1 line
6.3 KiB
Plaintext
1 line
6.3 KiB
Plaintext
{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/favourited_statuses/index.js"],"names":["messages","Object","react_intl__WEBPACK_IMPORTED_MODULE_14__","heading","id","defaultMessage","Favourites","react_redux__WEBPACK_IMPORTED_MODULE_6__","state","statusIds","getIn","isLoading","hasMore","handlePin","_this$props","_this","props","columnId","dispatch","_actions_columns__WEBPACK_IMPORTED_MODULE_12__","handleMove","dir","_this$props2","handleHeaderClick","column","scrollTop","setRef","c","handleLoadMore","lodash_debounce__WEBPACK_IMPORTED_MODULE_4___default","_actions_favourites__WEBPACK_IMPORTED_MODULE_9__","leading","componentWillMount","this","render","_props","intl","shouldUpdateScroll","multiColumn","pinned","emptyMessage","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","react__WEBPACK_IMPORTED_MODULE_5___default","a","createElement","_ui_components_column__WEBPACK_IMPORTED_MODULE_10__","ref","label","formatMessage","_components_column_header__WEBPACK_IMPORTED_MODULE_11__","icon","title","onPin","onMove","onClick","showBackButton","_components_status_list__WEBPACK_IMPORTED_MODULE_13__","trackScroll","scrollKey","onLoadMore","react_immutable_pure_component__WEBPACK_IMPORTED_MODULE_15__","propTypes","prop_types__WEBPACK_IMPORTED_MODULE_7___default","func","isRequired","react_immutable_proptypes__WEBPACK_IMPORTED_MODULE_8___default","list","object","string","bool"],"mappings":"sVAaMA,EAAWC,OAAAC,EAAA,EAAAD,EACfE,SAAAC,GAAA,oBAAAC,eAAA,gBAWmBC,EAFpBL,OAAAM,EAAA,QAAAN,CANuB,SAAAO,GAAA,OACtBC,UAAWD,EAAME,OAAO,eAAgB,aAAc,UACtDC,UAAWH,EAAME,OAAO,eAAgB,aAAc,cAAc,GACpEE,UAAWJ,EAAME,OAAO,eAAgB,aAAc,cAIvDT,OAAAC,EAAA,EAAAD,iLAkBCY,UAAY,WAAM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,KAAKL,eAlBrBS,mBAmBwBA,EAnBxBG,aAoBkBA,SAvEgBoB,EAAA,KAE/BC,WACL3C,SAAU4C,EAAAnB,EAAUoB,KAAKC,WACzB3B,mBAAoByB,EAAAnB,EAAUoB,KAC9BtD,UAAWwD,EAAAtB,EAAmBuB,KAAKF,WACnC5B,KAAM0B,EAAAnB,EAAUwB,OAAOH,WACvB/C,SAAU6C,EAAAnB,EAAUyB,OACpB9B,YAAawB,EAAAnB,EAAU0B,KACvBzD,QAASkD,EAAAnB,EAAU0B,KACnB1D,UAAWmD,EAAAnB,EAAU0B","file":"features/favourited_statuses.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { fetchFavouritedStatuses, expandFavouritedStatuses } from '../../actions/favourites';\nimport Column from '../ui/components/column';\nimport ColumnHeader from '../../components/column_header';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport StatusList from '../../components/status_list';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { debounce } from 'lodash';\n\nconst messages = defineMessages({\n heading: { id: 'column.favourites', defaultMessage: 'Favourites' },\n});\n\nconst mapStateToProps = state => ({\n statusIds: state.getIn(['status_lists', 'favourites', 'items']),\n isLoading: state.getIn(['status_lists', 'favourites', 'isLoading'], true),\n hasMore: !!state.getIn(['status_lists', 'favourites', 'next']),\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class Favourites extends ImmutablePureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n statusIds: ImmutablePropTypes.list.isRequired,\n intl: PropTypes.object.isRequired,\n columnId: PropTypes.string,\n multiColumn: PropTypes.bool,\n hasMore: PropTypes.bool,\n isLoading: PropTypes.bool,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchFavouritedStatuses());\n }\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('FAVOURITES', {}));\n }\n }\n\n handleMove = (dir) => {\n const { columnId, dispatch } = this.props;\n dispatch(moveColumn(columnId, dir));\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandFavouritedStatuses());\n }, 300, { leading: true })\n\n render () {\n const { intl, shouldUpdateScroll, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;\n const pinned = !!columnId;\n\n const emptyMessage = <FormattedMessage id='empty_column.favourited_statuses' defaultMessage=\"You don't have any favourite toots yet. When you favourite one, it will show up here.\" />;\n\n return (\n <Column ref={this.setRef} label={intl.formatMessage(messages.heading)}>\n <ColumnHeader\n icon='star'\n title={intl.formatMessage(messages.heading)}\n onPin={this.handlePin}\n onMove={this.handleMove}\n onClick={this.handleHeaderClick}\n pinned={pinned}\n multiColumn={multiColumn}\n showBackButton\n />\n\n <StatusList\n trackScroll={!pinned}\n statusIds={statusIds}\n scrollKey={`favourited_statuses-${columnId}`}\n hasMore={hasMore}\n isLoading={isLoading}\n onLoadMore={this.handleLoadMore}\n shouldUpdateScroll={shouldUpdateScroll}\n emptyMessage={emptyMessage}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |