revert commit dd8ab64
and minor cleanup for fileActions
This commit is contained in:
parent
73c2d02e38
commit
3eef5d7070
1 changed files with 15 additions and 16 deletions
|
@ -8,8 +8,7 @@ class FileActions extends React.PureComponent {
|
||||||
const { fileInfo, uri, openModal, claimIsMine } = this.props;
|
const { fileInfo, uri, openModal, claimIsMine } = this.props;
|
||||||
|
|
||||||
const claimId = fileInfo ? fileInfo.claim_id : null,
|
const claimId = fileInfo ? fileInfo.claim_id : null,
|
||||||
showDelete = fileInfo && Object.keys(fileInfo).length > 0,
|
showDelete = fileInfo && Object.keys(fileInfo).length > 0;
|
||||||
showSupport = !claimIsMine;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="card__actions">
|
<section className="card__actions">
|
||||||
|
@ -31,22 +30,22 @@ class FileActions extends React.PureComponent {
|
||||||
className="no-underline"
|
className="no-underline"
|
||||||
onClick={() => openModal(modals.CONFIRM_FILE_REMOVE, { uri })}
|
onClick={() => openModal(modals.CONFIRM_FILE_REMOVE, { uri })}
|
||||||
/>}
|
/>}
|
||||||
<Link
|
{!claimIsMine &&
|
||||||
button="text"
|
|
||||||
icon="icon-flag"
|
|
||||||
href={`https://lbry.io/dmca?claim_id=${claimId}`}
|
|
||||||
className="no-underline"
|
|
||||||
label={__("report")}
|
|
||||||
/>
|
|
||||||
{showSupport &&
|
|
||||||
<Link
|
<Link
|
||||||
button="primary"
|
button="text"
|
||||||
icon="icon-gift"
|
icon="icon-flag"
|
||||||
label={__("Support")}
|
href={`https://lbry.io/dmca?claim_id=${claimId}`}
|
||||||
navigate="/show"
|
className="no-underline"
|
||||||
className="card__action--right no-underline"
|
label={__("report")}
|
||||||
navigateParams={{ uri, tab: "tip" }}
|
|
||||||
/>}
|
/>}
|
||||||
|
<Link
|
||||||
|
button="primary"
|
||||||
|
icon="icon-gift"
|
||||||
|
label={__("Support")}
|
||||||
|
navigate="/show"
|
||||||
|
className="card__action--right no-underline"
|
||||||
|
navigateParams={{ uri, tab: "tip" }}
|
||||||
|
/>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue