1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/list_timeline/index.js"],"names":["messages","Object","react_intl__WEBPACK_IMPORTED_MODULE_12__","deleteMessage","id","defaultMessage","deleteConfirm","ListTimeline","react_redux__WEBPACK_IMPORTED_MODULE_5__","state","props","list","getIn","params","hasUnread","handlePin","_this$props","_this","columnId","dispatch","_actions_columns__WEBPACK_IMPORTED_MODULE_11__","context","router","history","push","handleMove","dir","_this$props2","handleHeaderClick","column","scrollTop","setRef","c","handleLoadMore","maxId","_actions_timelines__WEBPACK_IMPORTED_MODULE_14__","handleEditClick","_actions_modal__WEBPACK_IMPORTED_MODULE_16__","listId","handleDeleteClick","_this$props3","intl","message","formatMessage","confirm","onConfirm","_actions_lists__WEBPACK_IMPORTED_MODULE_15__","componentDidMount","this","disconnect","_actions_streaming__WEBPACK_IMPORTED_MODULE_13__","componentWillUnmount","render","_props","shouldUpdateScroll","multiColumn","pinned","title","get","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","_components_column__WEBPACK_IMPORTED_MODULE_8__","className","_components_loading_indicator__WEBPACK_IMPORTED_MODULE_18__","_components_column_back_button__WEBPACK_IMPORTED_MODULE_9__","_components_missing_indicator__WEBPACK_IMPORTED_MODULE_17__","react__WEBPACK_IMPORTED_MODULE_4___default","a","createElement","ref","label","_components_column_header__WEBPACK_IMPORTED_MODULE_10__","icon","active","onPin","onMove","onClick","tabIndex","_ui_containers_status_list_container__WEBPACK_IMPORTED_MODULE_7__","trackScroll","scrollKey","timelineId","onLoadMore","emptyMessage","PureComponent","contextTypes","prop_types__WEBPACK_IMPORTED_MODULE_6___default","object"],"mappings":"6VAiBMA,EAAWC,OAAAC,EAAA,EAAAD,EACfE,eAAAC,GAAA,oCAAAC,eAAA,0DACAC,eAAAF,GAAA,oCAAAC,eAAA,YAUmBE,EAFpBN,OAAAO,EAAA,QAAAP,CALuB,SAACQ,EAAOC,GAAR,OACtBC,K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4D,aAb5DC,eAawF,eAbxFsD,IAAA,UAAAE,UAgBwB,sCAhBxBe,SAgBuE,IAhBvED,QAgBoF3B,KAAKT,wBAhBzF,EAAAoB,IAAA,KAAAE,UAiBqB,gBAjBrB,IAAAF,IAiBuCzD,EAAA,GAjBvCE,GAiB2D,eAjB3DC,eAiByF,kBAjBzFsD,IAAA,UAAAA,IAwBGkB,EAAA,GAxBHC,aAyBkBtB,EAzBlBuB,UAAA,iBA0BgC7D,EA1BhC8D,WAAA,QA2BwB5E,EA3BxB6E,WA4BgBjC,KAAKf,eA5BrBiD,aAAAvB,IA6BmBzD,EAAA,GA7BnBE,GA6BuC,oBA7BvCC,eA6B0E,2GA7B1EiD,mBA8BwBA,SA5IYW,EAAAC,EAAMiB,iBAEvCC,cACL9D,OAAQ+D,EAAAnB,EAAUoB","file":"features/list_timeline.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport StatusListContainer from '../ui/containers/status_list_container';\nimport Column from '../../components/column';\nimport ColumnBackButton from '../../components/column_back_button';\nimport ColumnHeader from '../../components/column_header';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport { FormattedMessage, defineMessages, injectIntl } from 'react-intl';\nimport { connectListStream } from '../../actions/streaming';\nimport { expandListTimeline } from '../../actions/timelines';\nimport { fetchList, deleteList } from '../../actions/lists';\nimport { openModal } from '../../actions/modal';\nimport MissingIndicator from '../../components/missing_indicator';\nimport LoadingIndicator from '../../components/loading_indicator';\n\nconst messages = defineMessages({\n deleteMessage: { id: 'confirmations.delete_list.message', defaultMessage: 'Are you sure you want to permanently delete this list?' },\n deleteConfirm: { id: 'confirmations.delete_list.confirm', defaultMessage: 'Delete' },\n});\n\nconst mapStateToProps = (state, props) => ({\n list: state.getIn(['lists', props.params.id]),\n hasUnread: state.getIn(['timelines', `list:${props.params.id}`, 'unread']) > 0,\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class ListTimeline extends React.PureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n columnId: PropTypes.string,\n hasUnread: PropTypes.bool,\n multiColumn: PropTypes.bool,\n list: PropTypes.oneOfType([ImmutablePropTypes.map, PropTypes.bool]),\n intl: PropTypes.object.isRequired,\n };\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('LIST', { id: this.props.params.id }));\n this.context.router.history.push('/');\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 componentDidMount () {\n const { dispatch } = this.props;\n const { id } = this.props.params;\n\n dispatch(fetchList(id));\n dispatch(expandListTimeline(id));\n\n this.disconnect = dispatch(connectListStream(id));\n }\n\n componentWillUnmount () {\n if (this.disconnect) {\n this.disconnect();\n this.disconnect = null;\n }\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleLoadMore = maxId => {\n const { id } = this.props.params;\n this.props.dispatch(expandListTimeline(id, { maxId }));\n }\n\n handleEditClick = () => {\n this.props.dispatch(openModal('LIST_EDITOR', { listId: this.props.params.id }));\n }\n\n handleDeleteClick = () => {\n const { dispatch, columnId, intl } = this.props;\n const { id } = this.props.params;\n\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.deleteMessage),\n confirm: intl.formatMessage(messages.deleteConfirm),\n onConfirm: () => {\n dispatch(deleteList(id));\n\n if (!!columnId) {\n dispatch(removeColumn(columnId));\n } else {\n this.context.router.history.push('/lists');\n }\n },\n }));\n }\n\n render () {\n const { shouldUpdateScroll, hasUnread, columnId, multiColumn, list } = this.props;\n const { id } = this.props.params;\n const pinned = !!columnId;\n const title = list ? list.get('title') : id;\n\n if (typeof list === 'undefined') {\n return (\n <Column>\n <div className='scrollable'>\n <LoadingIndicator />\n </div>\n </Column>\n );\n } else if (list === false) {\n return (\n <Column>\n <ColumnBackButton />\n <MissingIndicator />\n </Column>\n );\n }\n\n return (\n <Column ref={this.setRef} label={title}>\n <ColumnHeader\n icon='list-ul'\n active={hasUnread}\n title={title}\n onPin={this.handlePin}\n onMove={this.handleMove}\n onClick={this.handleHeaderClick}\n pinned={pinned}\n multiColumn={multiColumn}\n >\n <div className='column-header__links'>\n <button className='text-btn column-header__setting-btn' tabIndex='0' onClick={this.handleEditClick}>\n <i className='fa fa-pencil' /> <FormattedMessage id='lists.edit' defaultMessage='Edit list' />\n </button>\n\n <button className='text-btn column-header__setting-btn' tabIndex='0' onClick={this.handleDeleteClick}>\n <i className='fa fa-trash' /> <FormattedMessage id='lists.delete' defaultMessage='Delete list' />\n </button>\n </div>\n\n <hr />\n </ColumnHeader>\n\n <StatusListContainer\n trackScroll={!pinned}\n scrollKey={`list_timeline-${columnId}`}\n timelineId={`list:${id}`}\n onLoadMore={this.handleLoadMore}\n emptyMessage={<FormattedMessage id='empty_column.list' defaultMessage='There is nothing in this list yet. When members of this list post new statuses, they will appear here.' />}\n shouldUpdateScroll={shouldUpdateScroll}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |