From 402710ce3b3538ec0a11866330f08f53a8ebc31b Mon Sep 17 00:00:00 2001 From: jessop Date: Fri, 1 May 2020 17:08:57 -0400 Subject: [PATCH] removes delete button and ensures resolve on show page --- ui/component/claimList/view.jsx | 6 ------ ui/component/claimPreview/view.jsx | 8 -------- ui/page/fileListPublished/view.jsx | 9 +-------- ui/page/show/view.jsx | 8 ++++++-- 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/ui/component/claimList/view.jsx b/ui/component/claimList/view.jsx index d52c9d068..57b0c5674 100644 --- a/ui/component/claimList/view.jsx +++ b/ui/component/claimList/view.jsx @@ -30,8 +30,6 @@ type Props = { showUnresolvedClaims?: boolean, renderProperties: ?(Claim) => Node, includeSupportAction?: boolean, - includeOwnerActions?: boolean, - abandonActionCallback?: any => void, hideBlock: boolean, injectedItem: ?Node, timedOutMessage?: Node, @@ -57,8 +55,6 @@ export default function ClaimList(props: Props) { showUnresolvedClaims, renderProperties, includeSupportAction, - includeOwnerActions, - abandonActionCallback, hideBlock, injectedItem, timedOutMessage, @@ -152,8 +148,6 @@ export default function ClaimList(props: Props) { uri={uri} type={type} includeSupportAction={includeSupportAction} - includeOwnerActions={includeOwnerActions} - abandonActionCallback={abandonActionCallback} showUnresolvedClaim={showUnresolvedClaims} properties={renderProperties || (type !== 'small' ? undefined : false)} showUserBlocked={showHiddenByUser} diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index a7e16f87e..14755c4db 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -15,7 +15,6 @@ import SubscribeButton from 'component/subscribeButton'; import ChannelThumbnail from 'component/channelThumbnail'; import BlockButton from 'component/blockButton'; import ClaimSupportButton from 'component/claimSupportButton'; -import ClaimAbandonButton from 'component/claimAbandonButton'; import useGetThumbnail from 'effects/use-get-thumbnail'; import ClaimPreviewTitle from 'component/claimPreviewTitle'; import ClaimPreviewSubtitle from 'component/claimPreviewSubtitle'; @@ -59,8 +58,6 @@ type Props = { customShouldHide?: Claim => boolean, showUnresolvedClaim?: boolean, includeSupportAction?: boolean, - includeOwnerActions?: boolean, - abandonActionCallback?: any => void, }; const ClaimPreview = forwardRef((props: Props, ref: any) => { @@ -93,8 +90,6 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { customShouldHide, showUnresolvedClaim, includeSupportAction, - includeOwnerActions, - abandonActionCallback, } = props; const shouldFetch = claim === undefined || (claim !== null && claim.value_type === 'channel' && isEmpty(claim.meta) && !pending); @@ -288,9 +283,6 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { )} {includeSupportAction && } - {includeOwnerActions && ( - - )} )} diff --git a/ui/page/fileListPublished/view.jsx b/ui/page/fileListPublished/view.jsx index 82784f0d1..c84805373 100644 --- a/ui/page/fileListPublished/view.jsx +++ b/ui/page/fileListPublished/view.jsx @@ -72,14 +72,7 @@ function FileListPublished(props: Props) { isBodyList body={
- fetchClaimListMine(params.page, params.page_size)} - /> + 0 ? Math.ceil(urlTotal / Number(pageSize)) : 1} />
} diff --git a/ui/page/show/view.jsx b/ui/page/show/view.jsx index c4b9bd879..e01761460 100644 --- a/ui/page/show/view.jsx +++ b/ui/page/show/view.jsx @@ -31,6 +31,7 @@ function ShowPage(props: Props) { const canonicalUrl = claim && claim.canonical_url; const claimExists = claim !== null && claim !== undefined; const haventFetchedYet = claim === undefined; + const isMine = claim && claim.is_my_output; useEffect(() => { // @if TARGET='web' @@ -42,10 +43,13 @@ function ShowPage(props: Props) { } // @endif - if ((resolveUri && !isResolvingUri && uri && haventFetchedYet) || (claimExists && !canonicalUrl)) { + if ( + (resolveUri && !isResolvingUri && uri && haventFetchedYet) || + (claimExists && (!canonicalUrl || isMine === undefined)) + ) { resolveUri(uri); } - }, [resolveUri, isResolvingUri, canonicalUrl, uri, claimExists, haventFetchedYet, history]); + }, [resolveUri, isResolvingUri, canonicalUrl, uri, claimExists, haventFetchedYet, history, isMine]); // Don't navigate directly to repost urls // Always redirect to the actual content -- 2.45.3