From 7730ee1e3fe0d0ebfeaef86daca8e7afc8e561a8 Mon Sep 17 00:00:00 2001 From: jessop Date: Fri, 24 Apr 2020 09:51:00 -0400 Subject: [PATCH] remove dependency on full claim list paginate claim list improve handling of pending publishes add abandon to publishes list previews use bodyCard fix publish edit notification --- package.json | 2 +- ui/component/claimAbandonButton/index.js | 13 +++ ui/component/claimAbandonButton/view.jsx | 21 +++++ ui/component/claimList/view.jsx | 6 ++ ui/component/claimPreview/view.jsx | 8 ++ ui/component/publishForm/index.js | 7 +- ui/component/publishForm/view.jsx | 7 +- ui/component/selectThumbnail/view.jsx | 6 +- ui/component/supportsLiquidate/index.js | 2 - .../internal/txo-list-item.jsx | 10 +-- ui/constants/claim.js | 3 + ui/modal/modalRepost/index.js | 19 ++--- ui/modal/modalRepost/view.jsx | 21 ++--- ui/modal/modalRevokeClaim/index.js | 3 +- ui/modal/modalRevokeClaim/view.jsx | 8 +- ui/page/fileListPublished/index.js | 27 +++--- ui/page/fileListPublished/view.jsx | 83 ++++++++++++++----- ui/redux/actions/app.js | 4 +- ui/redux/actions/publish.js | 29 ++++--- yarn.lock | 4 +- 20 files changed, 188 insertions(+), 95 deletions(-) create mode 100644 ui/component/claimAbandonButton/index.js create mode 100644 ui/component/claimAbandonButton/view.jsx diff --git a/package.json b/package.json index 95df825ec..1322f6573 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "imagesloaded": "^4.1.4", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#f8c26fbe34f49a9898d48b8a41c956b9ad4ff582", + "lbry-redux": "lbryio/lbry-redux#58ff4d8086cf2d038e0f606f50e04d67efec596a", "lbryinc": "lbryio/lbryinc#cc62a4eec10845cc0b31da7d0f27287cfa7c4866", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/ui/component/claimAbandonButton/index.js b/ui/component/claimAbandonButton/index.js new file mode 100644 index 000000000..e32042d7e --- /dev/null +++ b/ui/component/claimAbandonButton/index.js @@ -0,0 +1,13 @@ +import { connect } from 'react-redux'; +import { doOpenModal } from 'redux/actions/app'; +import ClaimAbandonButton from './view'; + +import { makeSelectClaimForUri } from 'lbry-redux'; + +const select = (state, props) => ({ + claim: props.uri && makeSelectClaimForUri(props.uri)(state), +}); + +export default connect(select, { + doOpenModal, +})(ClaimAbandonButton); diff --git a/ui/component/claimAbandonButton/view.jsx b/ui/component/claimAbandonButton/view.jsx new file mode 100644 index 000000000..52d5c37a0 --- /dev/null +++ b/ui/component/claimAbandonButton/view.jsx @@ -0,0 +1,21 @@ +// @flow +import * as MODALS from 'constants/modal_types'; +import * as ICONS from 'constants/icons'; +import React from 'react'; +import Button from 'component/button'; + +type Props = { + doOpenModal: (string, {}) => void, + claim: StreamClaim, + abandonActionCallback: any => void, +}; + +export default function ClaimAbandonButton(props: Props) { + const { doOpenModal, claim, abandonActionCallback } = props; + + function abandonClaim() { + doOpenModal(MODALS.CONFIRM_CLAIM_REVOKE, { claim: claim, cb: abandonActionCallback }); + } + + return