Revert "Fixes #3200 Claim previews right-clickable - original author (michaeltintiuc)"
This reverts commit 0b55f26fce
.
This commit is contained in:
parent
0b55f26fce
commit
72d69d5d31
4 changed files with 5 additions and 17 deletions
|
@ -23,7 +23,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Prevent spacebar from toggling fullscreen on Firefox ([#3546](https://github.com/lbryio/lbry-desktop/pull/3546))
|
||||
- Context menu not working properly in some cases ([#3604](https://github.com/lbryio/lbry-desktop/pull/3604))
|
||||
- Don't autoplay paid content or content from blocked channels ([#3570](https://github.com/lbryio/lbry-desktop/pull/3570))
|
||||
- Make claim previews right clickable ([#3627](https://github.com/lbryio/lbry-desktop/pull/3627))
|
||||
|
||||
## [0.39.1] - [2019-1-24]
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// @flow
|
||||
import type { Node } from 'react';
|
||||
import React, { useEffect, forwardRef } from 'react';
|
||||
import { NavLink, withRouter } from 'react-router-dom';
|
||||
import classnames from 'classnames';
|
||||
import { parseURI, convertToShareLink } from 'lbry-redux';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { openCopyLinkMenu } from 'util/context-menu';
|
||||
import { formatLbryUrlForWeb } from 'util/url';
|
||||
import { isEmpty } from 'util/object';
|
||||
|
@ -102,12 +102,6 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
|
||||
const isChannel = isValid ? parseURI(uri).isChannel : false;
|
||||
const signingChannel = claim && claim.signing_channel;
|
||||
const canonicalUrl = claim && claim.canonical_url;
|
||||
const navigateUrl = canonicalUrl ? formatLbryUrlForWeb(canonicalUrl) : undefined;
|
||||
const navLinkProps = {
|
||||
to: navigateUrl || '/', // Pass in a dummy url while it's resolving, it won't be clickable
|
||||
onClick: e => e.stopPropagation(),
|
||||
};
|
||||
|
||||
// do not block abandoned and nsfw claims if showUserBlocked is passed
|
||||
let shouldHide =
|
||||
|
@ -168,7 +162,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
}
|
||||
|
||||
if (claim && !pending) {
|
||||
history.push(navigateUrl || uri);
|
||||
history.push(formatLbryUrlForWeb(claim.canonical_url ? claim.canonical_url : uri));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,17 +230,13 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
<ChannelThumbnail uri={uri} obscure={channelIsBlocked} />
|
||||
</UriIndicator>
|
||||
) : (
|
||||
<NavLink {...navLinkProps}>
|
||||
<FileThumbnail thumbnail={thumbnailUrl} />
|
||||
</NavLink>
|
||||
<FileThumbnail thumbnail={thumbnailUrl} />
|
||||
)}
|
||||
|
||||
<div className="claim-preview__text">
|
||||
<div className="claim-preview-metadata">
|
||||
<div className="claim-preview-info">
|
||||
<NavLink {...navLinkProps}>
|
||||
<ClaimPreviewTitle uri={uri} />
|
||||
</NavLink>
|
||||
<ClaimPreviewTitle uri={uri} />
|
||||
{!isChannel && <FileProperties uri={uri} />}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ function ClaimPreviewTile(props: Props) {
|
|||
const navigateUrl = canonicalUrl ? formatLbryUrlForWeb(canonicalUrl) : undefined;
|
||||
|
||||
const navLinkProps = {
|
||||
to: navigateUrl || '/', // Pass in a dummy url while it's resolving, it won't be clickable
|
||||
to: navigateUrl,
|
||||
onClick: e => e.stopPropagation(),
|
||||
};
|
||||
|
||||
|
|
|
@ -187,7 +187,6 @@
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.claim-preview-metadata {
|
||||
|
|
Loading…
Reference in a new issue