More recon (#6400)

* rm

* rm

* recon

* claimlist recon
This commit is contained in:
jessopb 2021-07-05 17:45:20 -04:00 committed by GitHub
parent 7919d30871
commit 75a78cb65d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 14 deletions

View file

@ -45,6 +45,7 @@ type Props = {
livestreamMap?: { [string]: any }, livestreamMap?: { [string]: any },
searchOptions?: any, searchOptions?: any,
collectionId?: string, collectionId?: string,
hideLivestreamClaims?: boolean,
}; };
export default function ClaimList(props: Props) { export default function ClaimList(props: Props) {
@ -76,6 +77,7 @@ export default function ClaimList(props: Props) {
livestreamMap, livestreamMap,
searchOptions, searchOptions,
collectionId, collectionId,
hideLivestreamClaims,
} = props; } = props;
const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW); const [currentSort, setCurrentSort] = usePersistedState(persistedStorageKey, SORT_NEW);
@ -135,6 +137,7 @@ export default function ClaimList(props: Props) {
properties={renderProperties} properties={renderProperties}
live={resolveLive(index)} live={resolveLive(index)}
collectionId={collectionId} collectionId={collectionId}
hideLivestreamClaims={hideLivestreamClaims}
/> />
))} ))}
{!timedOut && urisLength === 0 && !loading && <div className="empty main--empty">{empty || noResultMsg}</div>} {!timedOut && urisLength === 0 && !loading && <div className="empty main--empty">{empty || noResultMsg}</div>}
@ -195,6 +198,7 @@ export default function ClaimList(props: Props) {
showUserBlocked={showHiddenByUser} showUserBlocked={showHiddenByUser}
showHiddenByUser={showHiddenByUser} showHiddenByUser={showHiddenByUser}
collectionId={collectionId} collectionId={collectionId}
hideLivestreamClaims={hideLivestreamClaims}
customShouldHide={(claim: StreamClaim) => { customShouldHide={(claim: StreamClaim) => {
// Hack to hide spee.ch thumbnail publishes // Hack to hide spee.ch thumbnail publishes
// If it meets these requirements, it was probably uploaded here: // If it meets these requirements, it was probably uploaded here:

View file

@ -22,7 +22,6 @@ type Props = {
isUpgradeAvailable: boolean, isUpgradeAvailable: boolean,
authPage: boolean, authPage: boolean,
filePage: boolean, filePage: boolean,
homePage: boolean,
noHeader: boolean, noHeader: boolean,
noFooter: boolean, noFooter: boolean,
noSideNavigation: boolean, noSideNavigation: boolean,

View file

@ -13,7 +13,6 @@ type Props = {
function NameHelpText(props: Props) { function NameHelpText(props: Props) {
const { uri, myClaimForUri, onEditMyClaim, isStillEditing } = props; const { uri, myClaimForUri, onEditMyClaim, isStillEditing } = props;
let nameHelpText; let nameHelpText;
if (isStillEditing) { if (isStillEditing) {

View file

@ -20,20 +20,20 @@ import Spinner from 'component/spinner';
type Props = { type Props = {
doToast: ({ message: string }) => void, doToast: ({ message: string }) => void,
doClearRepostError: () => void, doClearRepostError: () => void,
doRepost: StreamRepostOptions => Promise<*>, doRepost: (StreamRepostOptions) => Promise<*>,
title: string, title: string,
claim?: StreamClaim, claim?: StreamClaim,
enteredContentClaim?: StreamClaim, enteredContentClaim?: StreamClaim,
balance: number, balance: number,
channels: ?Array<ChannelClaim>, channels: ?Array<ChannelClaim>,
doCheckPublishNameAvailability: string => Promise<*>, doCheckPublishNameAvailability: (string) => Promise<*>,
error: ?string, error: ?string,
reposting: boolean, reposting: boolean,
uri: string, uri: string,
name: string, name: string,
contentUri: string, contentUri: string,
setRepostUri: string => void, setRepostUri: (string) => void,
setContentUri: string => void, setContentUri: (string) => void,
doCheckPendingClaims: () => void, doCheckPendingClaims: () => void,
redirectUri?: string, redirectUri?: string,
passedRepostAmount: number, passedRepostAmount: number,
@ -88,7 +88,7 @@ function RepostCreate(props: Props) {
const repostUrlName = `lbry://${incognito || !activeChannelClaim ? '' : `${activeChannelClaim.name}/`}`; const repostUrlName = `lbry://${incognito || !activeChannelClaim ? '' : `${activeChannelClaim.name}/`}`;
const contentFirstRender = React.useRef(true); const contentFirstRender = React.useRef(true);
const setAutoRepostBid = amount => { const setAutoRepostBid = (amount) => {
if (balance && balance > 0.02) { if (balance && balance > 0.02) {
if (uri) { if (uri) {
setRepostBid(0.01); setRepostBid(0.01);
@ -113,7 +113,7 @@ function RepostCreate(props: Props) {
const isLbryUrl = value.startsWith('lbry://') && value !== 'lbry://'; const isLbryUrl = value.startsWith('lbry://') && value !== 'lbry://';
const error = ''; const error = '';
const addLbryIfNot = term => { const addLbryIfNot = (term) => {
return term.startsWith('lbry://') ? term : `lbry://${term}`; return term.startsWith('lbry://') ? term : `lbry://${term}`;
}; };
if (wasCopiedFromWeb) { if (wasCopiedFromWeb) {
@ -178,7 +178,7 @@ function RepostCreate(props: Props) {
React.useEffect(() => { React.useEffect(() => {
if (enteredRepostName && isNameValid(enteredRepostName, false)) { if (enteredRepostName && isNameValid(enteredRepostName, false)) {
doCheckPublishNameAvailability(enteredRepostName).then(r => setAvailable(r)); doCheckPublishNameAvailability(enteredRepostName).then((r) => setAvailable(r));
} }
}, [enteredRepostName, doCheckPublishNameAvailability]); }, [enteredRepostName, doCheckPublishNameAvailability]);
@ -320,7 +320,7 @@ function RepostCreate(props: Props) {
<div> <div>
{uri && ( {uri && (
<fieldset-section> <fieldset-section>
<ClaimPreview key={uri} uri={uri} actions={''} type={'inline'} showNullPlaceholder /> <ClaimPreview key={uri} uri={uri} actions={''} showNullPlaceholder />
</fieldset-section> </fieldset-section>
)} )}
{!uri && name && ( {!uri && name && (
@ -331,7 +331,7 @@ function RepostCreate(props: Props) {
name="content_url" name="content_url"
value={enteredContent} value={enteredContent}
error={contentError} error={contentError}
onChange={event => setEnteredContentUri(event.target.value)} onChange={(event) => setEnteredContentUri(event.target.value)}
placeholder={__('Enter a name or %domain% URL', { domain: SITE_URL })} placeholder={__('Enter a name or %domain% URL', { domain: SITE_URL })}
/> />
</> </>
@ -363,7 +363,7 @@ function RepostCreate(props: Props) {
type="text" type="text"
name="repost_name" name="repost_name"
value={enteredRepostName} value={enteredRepostName}
onChange={event => setEnteredRepostName(event.target.value)} onChange={(event) => setEnteredRepostName(event.target.value)}
placeholder={__('MyFunName')} placeholder={__('MyFunName')}
/> />
</fieldset-group> </fieldset-group>
@ -388,8 +388,8 @@ function RepostCreate(props: Props) {
</> </>
} }
disabled={!enteredRepostName || resolvingRepost} disabled={!enteredRepostName || resolvingRepost}
onChange={event => setRepostBid(event.target.value)} onChange={(event) => setRepostBid(event.target.value)}
onWheel={e => e.stopPropagation()} onWheel={(e) => e.stopPropagation()}
/> />
</React.Fragment> </React.Fragment>