From c73ba60ef5c0e2f825c378f8c02b36da19347ebe Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 7 Apr 2021 07:52:54 +0800 Subject: [PATCH] Revert "Use blank poster and advisory when preview is blocked by insufficient stake." This reverts commit 9d1cf97aeff030fe7b96983b80e2eaef10d885ad. --- ui/component/claimLink/view.jsx | 36 ++++-------------------- ui/component/embedPlayButton/view.jsx | 16 ++++------- ui/component/markdownLink/view.jsx | 15 ++++++++-- ui/scss/component/_markdown-preview.scss | 7 ----- 4 files changed, 23 insertions(+), 51 deletions(-) diff --git a/ui/component/claimLink/view.jsx b/ui/component/claimLink/view.jsx index d999cd028..f2fe09726 100644 --- a/ui/component/claimLink/view.jsx +++ b/ui/component/claimLink/view.jsx @@ -5,7 +5,6 @@ import EmbedPlayButton from 'component/embedPlayButton'; import Button from 'component/button'; import UriIndicator from 'component/uriIndicator'; import { INLINE_PLAYER_WRAPPER_CLASS } from 'component/fileRenderFloating/view'; -import { SIMPLE_SITE } from 'config'; type Props = { uri: string, @@ -13,7 +12,7 @@ type Props = { children: React.Node, description: ?string, isResolvingUri: boolean, - doResolveUri: (string) => void, + doResolveUri: string => void, blackListedOutpoints: Array<{ txid: string, nout: number, @@ -21,7 +20,6 @@ type Props = { playingUri: ?PlayingUri, parentCommentId?: string, isMarkdownPost?: boolean, - allowPreview?: boolean, }; class ClaimLink extends React.Component { @@ -48,7 +46,7 @@ class ClaimLink extends React.Component { let blackListed = false; blackListed = blackListedOutpoints.some( - (outpoint) => + outpoint => (signingChannel && outpoint.txid === signingChannel.txid && outpoint.nout === signingChannel.nout) || (outpoint.txid === claim.txid && outpoint.nout === claim.nout) ); @@ -65,16 +63,7 @@ class ClaimLink extends React.Component { }; render() { - const { - uri, - claim, - children, - isResolvingUri, - playingUri, - parentCommentId, - isMarkdownPost, - allowPreview, - } = this.props; + const { uri, claim, children, isResolvingUri, playingUri, parentCommentId, isMarkdownPost } = this.props; const isUnresolved = (!isResolvingUri && !claim) || !claim; const isBlacklisted = this.isClaimBlackListed(); const isPlayingInline = @@ -99,24 +88,9 @@ class ClaimLink extends React.Component { [INLINE_PLAYER_WRAPPER_CLASS]: isPlayingInline, })} > - + - {(allowPreview || !SIMPLE_SITE) && ( -