diff --git a/static/app-strings.json b/static/app-strings.json index cfd921c97..67bc58bbd 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -32,6 +32,7 @@ "Play": "Play", "Subscribe": "Subscribe", "Report content": "Report content", + "Report Content": "Report Content", "Content-Type": "Content-Type", "Languages": "Languages", "Media Type": "Media Type", @@ -676,6 +677,7 @@ "lbry.tv": "lbry.tv", "Bid position must be a number.": "Bid position must be a number.", "Copy": "Copy", + "Copy Link": "Copy Link", "Text copied": "Text copied", "Rewards Disabled": "Rewards Disabled", "Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%.": "Wallet servers are used to relay data to and from the LBRY blockchain. They also determine what content shows in trending or is blocked. %learn_more%.", diff --git a/ui/component/claimMenuList/view.jsx b/ui/component/claimMenuList/view.jsx index c0b1ec932..7d534d424 100644 --- a/ui/component/claimMenuList/view.jsx +++ b/ui/component/claimMenuList/view.jsx @@ -4,6 +4,7 @@ import React from 'react'; import classnames from 'classnames'; import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button'; import Icon from 'component/common/icon'; +import { convertToShareLink } from 'lbry-redux'; type Props = { claim: ?Claim, @@ -33,7 +34,7 @@ function ClaimMenuList(props: Props) { ? claim.permanent_url : claim.signing_channel && claim.signing_channel.permanent_url); - if (!channelUri || claimIsMine) { + if (!channelUri || !claim) { return null; } @@ -49,6 +50,15 @@ function ClaimMenuList(props: Props) { } } + function handleCopyLink() { + const shareLink = convertToShareLink(claim.canonical_url || claim.permanent_url); + navigator.clipboard.writeText(shareLink); + } + + function handleReportContent() { + window.open(`https://lbry.com/dmca/${claim.claim_id}`, '_blank', 'noopener'); + } + return (
); diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index 805b807c9..a595ba500 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -4,9 +4,6 @@ import React, { useEffect, forwardRef } from 'react'; import { NavLink, withRouter } from 'react-router-dom'; import classnames from 'classnames'; import { parseURI } from 'lbry-redux'; -// @if TARGET='app' -import { openClaimPreviewMenu } from 'util/context-menu'; -// @endif import { formatLbryUrlForWeb } from 'util/url'; import { isEmpty } from 'util/object'; import FileThumbnail from 'component/fileThumbnail'; @@ -188,14 +185,6 @@ const ClaimPreview = forwardRef