mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 18:15:19 +00:00
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/list_timeline/index.js"],"names":["messages","defineMessages","deleteMessage","id","defaultMessage","deleteConfirm","ListTimeline","connect","state","props","list","getIn","params","hasUnread","injectIntl","_this$props","_this","columnId","dispatch","removeColumn","addColumn","context","router","history","push","dir","_this$props2","moveColumn","column","scrollTop","c","maxId","expandListTimeline","openModal","listId","_this$props3","intl","message","formatMessage","confirm","onConfirm","deleteList","componentDidMount","this","fetchList","disconnect","connectListStream","componentWillUnmount","render","_this$props4","shouldUpdateScroll","multiColumn","pinned","title","get","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","_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","setRef","label","_components_column_header__WEBPACK_IMPORTED_MODULE_10__","icon","active","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","tabIndex","handleEditClick","mastodon_components_icon__WEBPACK_IMPORTED_MODULE_19__","react_intl__WEBPACK_IMPORTED_MODULE_12__","handleDeleteClick","_ui_containers_status_list_container__WEBPACK_IMPORTED_MODULE_7__","trackScroll","scrollKey","timelineId","onLoadMore","handleLoadMore","emptyMessage","React","PureComponent","PropTypes","object"],"mappings":"qUAkBMA,EAAWC,YAAe,CAC9BC,cAAa,CAAAC,GAAA,oCAAAC,eAAA,0DACbC,cAAa,CAAAF,GAAA,oCAAAC,eAAA,YAUTE,EAFUC,kBALQ,SAACC,EAAOC,GAAR,MAAmB,CACzCC,KAAMF,EAAMG,MAAM,CAAC,QAASF,EAAMG,OAAOT,KACzCU,UA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ShC,KAAKsC,wBAAnF,EACE1B,OAAAC,EAAA,EAAAD,CAACwB,EAAA,EAAD,CAAM5E,GAAG,UADX,IACsBoD,OAAAC,EAAA,EAAAD,CAACyB,EAAA,EAAD,CAAkB7E,GAAG,eAAeC,eAAe,kBAI3EmD,OAAAC,EAAA,EAAAD,CAAA,UAGFA,OAAAC,EAAA,EAAAD,CAAC2B,EAAA,EAAD,CACEC,aAAc/B,EACdgC,UAAS,iBAAmBnE,EAC5BoE,WAAU,QAAUlF,EACpBmF,WAAY3C,KAAK4C,eACjBC,aAAcjC,OAAAC,EAAA,EAAAD,CAACyB,EAAA,EAAD,CAAkB7E,GAAG,oBAAoBC,eAAe,2GACtE8C,mBAAoBA,SA5IHuC,IAAMC,4CAET,CACpBpE,OAAQqE,IAAUC","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';\nimport Icon from 'mastodon/components/icon';\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\nexport default @connect(mapStateToProps)\n@injectIntl\nclass 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 <Icon id='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 <Icon id='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":""} |