fix: show publish icon on my own claims
This commit is contained in:
parent
d63d314406
commit
736248a70b
2 changed files with 7 additions and 2 deletions
|
@ -133,7 +133,8 @@ class FileCard extends React.PureComponent<Props> {
|
||||||
<FilePrice hideFree uri={uri} />
|
<FilePrice hideFree uri={uri} />
|
||||||
{isRewardContent && <Icon iconColor="red" icon={icons.FEATURED} />}
|
{isRewardContent && <Icon iconColor="red" icon={icons.FEATURED} />}
|
||||||
{isSubscribed && <Icon icon={icons.SUBSCRIPTION} />}
|
{isSubscribed && <Icon icon={icons.SUBSCRIPTION} />}
|
||||||
{fileInfo && <Icon icon={icons.LOCAL} />}
|
{claimIsMine && <Icon icon={icons.PUBLISHED} />}
|
||||||
|
{!claimIsMine && fileInfo && <Icon icon={icons.LOCAL} />}
|
||||||
{isNew && <span className="badge badge--alert">{__('NEW')}</span>}
|
{isNew && <span className="badge badge--alert">{__('NEW')}</span>}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -59,6 +59,7 @@ class FileTile extends React.PureComponent<Props> {
|
||||||
rewardedContentClaimIds,
|
rewardedContentClaimIds,
|
||||||
size,
|
size,
|
||||||
isNew,
|
isNew,
|
||||||
|
claimIsMine,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id);
|
const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id);
|
||||||
|
|
||||||
|
@ -67,12 +68,15 @@ class FileTile extends React.PureComponent<Props> {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
// TODO: turn this into it's own component and share it with FileCard
|
||||||
|
// The only issue is icon placement on the search page
|
||||||
<div className={classnames('media__properties', { card__subtitle: size === 'large' })}>
|
<div className={classnames('media__properties', { card__subtitle: size === 'large' })}>
|
||||||
<FilePrice hideFree uri={uri} />
|
<FilePrice hideFree uri={uri} />
|
||||||
{isNew && <span className="badge badge--alert icon">{__('NEW')}</span>}
|
{isNew && <span className="badge badge--alert icon">{__('NEW')}</span>}
|
||||||
{isSubscribed && <Icon icon={ICONS.SUBSCRIPTION} />}
|
{isSubscribed && <Icon icon={ICONS.SUBSCRIPTION} />}
|
||||||
{isRewardContent && <Icon iconColor="red" icon={ICONS.FEATURED} />}
|
{isRewardContent && <Icon iconColor="red" icon={ICONS.FEATURED} />}
|
||||||
{isDownloaded && <Icon icon={ICONS.LOCAL} />}
|
{!claimIsMine && isDownloaded && <Icon icon={ICONS.LOCAL} />}
|
||||||
|
{claimIsMine && <Icon icon={ICONS.PUBLISHED} />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue