Merge pull request #2249 from lbryio/publish-icon

Add Published icon to file{card,tile} for your own files
This commit is contained in:
Sean Yesmunt 2019-01-31 11:56:42 -05:00 committed by GitHub
commit 0c213bfbb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View file

@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- Less intrusive first run flow ([#2210](https://github.com/lbryio/lbry-desktop/pull/2210))
- Add icon for your own publishes on cards/tiles ([#2249](https://github.com/lbryio/lbry-desktop/pull/2249))
### Fixed

View file

@ -133,7 +133,8 @@ class FileCard extends React.PureComponent<Props> {
<FilePrice hideFree uri={uri} />
{isRewardContent && <Icon iconColor="red" icon={icons.FEATURED} />}
{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>}
</div>
</li>

View file

@ -59,6 +59,7 @@ class FileTile extends React.PureComponent<Props> {
rewardedContentClaimIds,
size,
isNew,
claimIsMine,
} = this.props;
const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id);
@ -67,12 +68,15 @@ class FileTile extends React.PureComponent<Props> {
}
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' })}>
<FilePrice hideFree uri={uri} />
{isNew && <span className="badge badge--alert icon">{__('NEW')}</span>}
{isSubscribed && <Icon icon={ICONS.SUBSCRIPTION} />}
{isRewardContent && <Icon iconColor="red" icon={ICONS.FEATURED} />}
{isDownloaded && <Icon icon={ICONS.LOCAL} />}
{!claimIsMine && isDownloaded && <Icon icon={ICONS.LOCAL} />}
{claimIsMine && <Icon icon={ICONS.PUBLISHED} />}
</div>
);
}

View file

@ -96,7 +96,7 @@
}
.media__properties {
bottom: -5rem;
bottom: -4.5rem;
left: -20rem;
position: absolute;
}